Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

FileAttachList

Summary: Adds a Ajax list of quickly attachable files to the edit page
Version: 0.1 June 18, 2007
Prerequisites: PmWiki
Status: Testing
Maintainer: Scotepi
Categories: Editing, Files, Uploads

Questions answered by this recipe

How can I view a list of attachable files on the edit page?

Description

Shows a link on the edit page to dynamically load a list of attachable files.

Install Instructions

  • Download jsfilelist.php to cookbook/jsfilelist.php
  • Add require_once("$FarmD/cookbook/jsfilelist.php"); to the end of local/config.php

Notes

  • To Change the look edit $Style in jsfilelist.php

Release Notes

  • 0.1 June 18, 2007
    • First Release

Comments

(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?

Edit - History - Print - Recent Changes - Search
Page last modified on September 14, 2008, at 08:49 PM