FileAttachList-Talk

Summary: Talk page for FileAttachList.
Maintainer: Scotepi Timethy?
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

(2017-09-05) Updated jsfilelistplus.zipΔ

  • File list can now be hidden and re-loaded after being loaded initially
  • Added ability to skip (not show) deleted uploaded (i.e. when $EnableUploadVersions is set to 1). This feature is disabled by default; to enable it, set $JSFileListSkipDeletedUploads = true; in config.php

(2017-09-03) Uploaded jsfilelistplus.zipΔ, which makes the following changes:

  • Recipe now honors $UploadPrefixFmt
  • Style for the attachlist is now configurable from config.php, via the variable $JSFileListStyle (but this must be set before including jsfilelist.php; see the recipe for the default style)
  • For users of LinkIcons, the file jsfilelist.css is provided that adds link icons to the links in the attachlist; to enable it, follow these steps:
    1. Place jsfilelist.css in pub/css
    2. In config.php, before include jsfilelist.php, add the line $JSFileListInsertLinkIconsEnabled = true;
  • Fixed some bugs

Said Achmiz September 03, 2017, at 09:20 PM

(2007-08-14) When I add the code above to local/config.php and copy to cookbook/jsfilelist.php, I get PHP code when loading pmwiki.php in edit mode. Also is it "require_once" or "include_once"? I tried both, but still got the echo of PHP code from jsfilelist.php.

(2007-08-21) Hi! I just tried it. The file you download when you click on the link is in fact the PHP source in HTML format. So what I did was to click on the link, this will show you the code in your browser. Just select all the code, copy-paste in a file named jsfilelist.php in your cookbook directory. Include this file in your local/config.php. Be sure that the skin you're using has a "<!--HTMLFooter-->" at the end of its code (mine hadn't), then you'll see the new link just before the buttons bar in edit mode. The only problem I found is that $uploaddir = FmtPageName("$jsflUploadDir$UploadPrefixFmt", $pagename); doesn't return the good directory if my page is in a PageGroup. I'll try to search why. (Jonathan Fretin)

(2007-08-26) Thanks Jonathan. However, now I although the ajax menu loads, my Save, Preview and Cancel buttons at the bottom of the edit window does not work. Advise?

(2009-05-21) Version 0.1 of this script is no longer compatible with the current version of PmWiki. The script reloads the page to get the filelist, and clobbers the URL in doing so, messing up the pagename variables. Here is a modified Version 0.2. Now it retains the original URL when loading the attachment list. Also it filters out thumbnails starting with th00. Works great with PmWiki pmwiki-2.2.1. timethy?

(2009-08-09) Very nifty recipe - thanks, just what I needed! It does not seem to work with group-based upload directories, though. It only lists files in $jsflUploadDir/$group/$name/, hardcoded. Would be neat if it honored $UploadPrefixFmt. Until then, just edit jsfilelist.php to $jsflUploadDir/$group/ to make it work for group-based uploads. Erich?

Talk page for the FileAttachList recipe (users?).