Plugin Manager plugin

plugin plugin by Chris Smith
Manage your wiki's plugins (bundled with DokuWiki)

Provides Admin.
Compatible with DokuWiki (bundled).

Tagged with !bundled, !cleanup, configuration, management, plugins.

This plugin allows administrators of the wiki to easily manage the wiki's plugins. It can:

  • provide a list of installed plugins and details information on each
  • install a plugin from a remote URL FIXME FIXME FIXME
  • remove an existing plugin
  • update a plugin from the original source location
  • refresh the wiki's plugins after a manual plugin installation!

Installation

The plugin is bundled with Dokuwiki. No extra installation is required.

In case of an error check that the /lib/plugins directory is writeable by the web process.

Bugs

  • chicken and egg with Plugin Manager styles. Dokuwiki needs to know to continue to support old style/script system until after first refresh plugins is performed. FIXED.

Usage

Note: To access the plugin Manager you need to log in as the super user, then select Admin, then Select Access Plugin Manager.

Installing a plugin from a remote URL

The simplest way to use the Plugin Manager to load a new Plugin, is:

  1. Find the plug in you want in the plugins page.
  2. Copy the link (URL) given on the page detailing your chosen plugin.
  3. Paste the link into the URL box on your plugin Manager page, and hit “Download”.

eg: go to plugins page. Select math2 plugin. Now under the Installation section copy the link to the source: “http://www.cdsmith.plus.com/dokuwiki/plugin-math.tar.gz” (note tar.gz files work just fine). Paste this into the URL window in your plugin Manager, and press the Button. Do not bother to go get a coffee. Look at screen and wonder if anything has happened. Then note that “Math” is now show as a plug in. - If you try it, it should just work.

Usage Issues:

FIXME: How do the heck do you use it? There seems to be a plugin in lib/plugins but can't find who calls it or how to use it. Is there a default admin page. As a new user I find this functionality obfuscated.

To get access to the default page you have to enable the acl system. See acl for more info. This requires copying the dist files under /conf for acl and user and creating a user with a password (using command line /sbin/md5 -s to encrypt the password). Once this is done and your wiki forced reloaded in your browser you should see a LOGIN button at the bottom. Once logged in you will see a ADMIN button at the bottom. — Ugh

To clear this up for new users: check that the conf['superuser'] is set correctly (conf/local.php overrides conf/dokuwiki.php!)

FIXME: How do the heck do you use it (question now from a different user)? I enabled acl, superuser is set, I reloaded apache and dokuwiki - but no login button and no admin. And I don't see ANY of the plugins that I have (in the right directory, of course)! phom 2007-08-27

FIXME: What do you do if you do not want to enable ACL, i.e. because you are using the dokuwiki internally, for personal use? Any way to enable the pluginmanager sans ACL? There are also some plugins which say “Installation: Use the Plugin Manager”. Period. It would be helpful to add: “or do….” for those who do not use the Plugin Manager, considering it is judged as still being “experimental”. – Jörg Volbers 2006-09-29

No, there is no way to turn on the plugin manager (or any other admin plugin) without enabling ACL. Only superusers have access to the admin menu. One solution, untested, turn on ACL, set superuser to @ALL.

To Do

Support proxy configuration.

Can you explain? — Christopher Smith 2005-12-17 07:46
I think it`s for downloading plug-in from the Internet through the URLbaleks 2006-01-29
Yes. Whe sitting behind a proxy, it's impossible to download plugins with the manager.
I agree, behind a proxy, there is no way to use the “auto-install by URL” feature. Proxy settings are: 1) proxy hostname or IP, 2) proxy port, 3) proxy username (if auth needed), 4) proxy password (if needed).

Comments/Discussion

I tried downloading a few .zip and .tar.gz plugins, but they never appear in my plugin list. I tried: http://wiki.splitbrain.org/_media/plugin:gallery-plugin-2005-08-14.tgz

… more to follow …

Can you give details of your server OS and confirm the server is able to write to the plugin directory and that the server has one or more of the bz2, gzip or zip PHP modules installed. If you have latest Dokuwiki version, plugin manager should be giving some messages about what it could or couldn't do. You can also try the plugins available http://www.cdsmith.plus.com/dokuwiki which are also available in zip format. — Christopher Smith 2005-10-01 15:21

Ok, I installed the camelcase .zip from cdsmith without issue - “Plugin camelcase installed successfully” - great - I guess it was an issue with the plugins links on splitbrain? - Fletch

Perhaps, the gallery plugin installs ok for me. Early versions of the plugin manager did have problems when the file was delivered as an attachment (as dokuwiki media links do), that has been corrected for some time now. — Christopher Smith 2005-10-10 11:53

If the folder permissions are wrong and the webserver has no write access, the status of a plugin download remains 'Downloading' forever and nothing is written. Perhaps an error could be displayed when this happens? – Styno 2005-10-17 23:23


A list of available plugins right inside the plugin manager would be really cool. This could be similar to the Spartacus plugin for Serendipity (http://www.s9y.org). It would also be great if plugins started distributing their own .txt files explaining their syntax that could be inserted into wiki:syntax.txt — Jonathan Arkell 2005-10-27 08:37


I have translated this plugin into Polish, in case anyone is interested. But since I cannot upload files here I have just sent them to Christopher. — Michał Tkacz 2005-11-20 17:43

Packaged and forwarded for inclusion in the development version, ready to find their way into the next release. Thanks Michal. — Christopher Smith 2005-11-21 03:17

A problem with some plugins is disk permissions. One solution could be to include a list of needed permissions in the meta-data of the plugin. With that info the plugin manager could generate a script to set permissions, to be run from the command line (if you ran it within php, you probably wouldn't have enough permissions). — Doeke Zanstra 2006-02-11

I don't see anywhere the admin button, neather a way to activate it. help

To enable the admin menu you must enable access control and create a super user, refer aclChristopher Smith 2006-04-20 03:10

I'd like to see the return value of the plugins' getSort() function in the list. Werner 2006-05-02 15:16 CEST ;-)


I've just resolved a problem I was having handling .tgz files on a Windows/Apache installation. Problem was tracked to the opening line of _extractList in tarlib.class.php (my version has a comment saying PHP Coder bug” which was appending ”./” to my $c_to path of “C:/…” and thus none of the subdirectories within the TAR ball was being created. I've currently commented out the offending (2) lines and it now works. — Mark Butterworth 2006-07-05 14:00AEST

Is this something that should make it into the official release ? Eg. an OS check and then enable/disable the PHP Coder bug” ? As far as I can tell disabling these two lines of code will enable (un)tar support on Windows boxes. charlieMOGUL 05-12-2006 16:00 GMT +01:00


I always get this error when i try to download a plugin via pluginmanager

Fatal error: Cannot redeclare class zip in X:\XXXX\XXXX\XXXX\dokuwiki\lib\plugins\plugin\inc\zip.lib.php on line 13

I'm running dokuwiki 2006-03-09b on a win 2k3 xamp-sever however on a win 2k3 iis-server in works fine. can't anyone help me? — Neosky 2006-08-10 14:08

You have another “class zip” somewhere. Can you find out where? If its part of the standard XAMP implementation we will need to alter the class name. For your self you can change the class name in the two places it appears, lib/plugins/plugin/admin.php line ~642
          $zip = new zip();

and lib\plugins\plugin\inc\zip.lib.php line 12

class zip

Change both occurrences to the same thing, e.g. dokuwiki_zip. In the first snipped, don't alter the $zip, just the zip(). — Christopher Smith 2006-08-10 20:13

Thank you this works just fine for me. However i didn't found the file where the other “class zip” is declared. — Neosky 2006-08-11 18:27

Each plugin that I try to download and install I see this message:

 "Suspect bad url - unable to determine file name from the url" 

Does anyone have any suggestions?

What version of DokuWiki do you have? Early versions of the plugin manager couldn't cope with the urls used by DokuWiki when the download is from a wiki page. That problem has since been resolved - and shouldn't occur in the current release version of DokuWiki. If you do have an older version of DokuWiki, please consider upgrading to the current release. If that isn't the problem, can you paste an example of a failing url here. Also, have you tried downloading any of my plugins … http://www.cdsmith.plus.com/dokuwiki/ … the links here have worked since the very first version of the plugin manager. — Christopher Smith 2006-09-03 11:59

The dokuwiki I am using lies on a webspace where *.zip files are not allowed. I am interested in the blog plugin, available as a *.zip.
And here my question: Does the pluginmanager unzip a downloaded file and remove the zip-file after installation?

Yes. Plugins can be installed manually too, download and unzip the plugin on your own computer then upload the files to your <dokuwiki>/lib/plugins/<plugin name> directory. — Christopher Smith 2006-12-12 19:30

How can I verify that Plugin Manager is bundled with my Dokuwiki?

I downloaded gcalendar plugin. Then as per the instruction I had to copy unzipped plugin folder in <dokuwiki>/lib/plugin directory. Now in my case these /lib/plugin were not present. SO I created these two directories & copied unzipped gcalendar plugin into that. Now I donot know how to use it. Can you please guide me how to proceed further.

The folder is lib/plugins. The plugin manager has been bundled with DokuWiki since 2006-03-05. Clicking the “Admin” button on your wiki will show you a menu, one of the options is “Manage Plugins”. Also look for the lib/plugins/plugin directory. Both of these will be present if you have the Plugin Manager. For details on how the gcalender plugin works, check out any documentation provided by its author. — Christopher Smith 2007-01-09 15:28

Not sure about the difference between a question and a query, and not sure that this page is actually reviewed.

I've done various things to “set permissions”– this is for an in-group manual development wiki. I've changed users.auth.php from what I gather is a demonstration line:

##userfile
##format:
####user:
##password:RealName:email:groups,comma, sep[a]rated:

to the following– I assumed that

##userfile
##fomat:

were identification for the contents of the file, and then

####user:
##password:AmazingProject21:Janet Doe:doe@server.anywher.ok:superuser,admin,user
####user:
##password:AmazingProject21:James Doe:doe2@server.anywher.ok:admin,user
####user:password:AmazingProject21:Joe King:king@server.anywher.ok:user

This is obviously different from the lines in other files that begin with a *, as in

*    @ALL

Or that begin with 'variable', or that begin with //

Nothing, at this point, is clear. What don't I know that I should–nutshell version, please.

Sigrid Peterson

Hi Sigrid, I'm not exactly sure what you are asking, but I don't think its to do with the plugin manager - maybe the user manager or ACL. Rather than adding a question to either of those pages you may be better off asking your questions in the forums, on the mailing list of in IRC. Details of how to take part in any of those media can be found on their pages in this wiki. — Christopher Smith 2007-03-07 15:32

I found that plugin manager breaks any multibyte characters in plugin descriptions. It is breaking them with htmlentities(), which is called from out(). If plugin description contains multibyte chars, they are certainly will show as garbage.

To fix that problem, one should tell htmlentities to work with data in the UTF-8 charset, instead of default ISO-8859-1:

538c538,539
<             return str_replace("\n",'<br />',htmlentities($text));
---
>           // fixed unicode breaking with htmlentities by passing to it a right charset for data
>           return str_replace("\n",'<br />',htmlentities($text,ENT_QUOTES,'UTF-8'));

Nikita Kipriyanov 2007-12-11

Cache and Revisions Eraser plug-in suffers from the same problem, since it loads the description from its own language files… for example, Russian language (Using UTF-8) displays the description as garbage. Using Nikita Kipriyanov diff fix will make it display correctly for all languages.


I am unable to download the discussion plugin. When I try to do it via the plugin manager I get the following message: Unable to download the plugin file: http:www/chimeric.de-src/plutin-discussion.tgz. I tried copying the files from the source directory: http://dev.chimeric.de/codereference/nav.html?plugins/discussion/index.html. This consisted of a discussion directory with 3 subdirectories: conf, lang, and syntax plus several other files off of the discussion directory. I then moved the discussion directory into my htdocs/<appname>/lib/plugins directory. I tried to paste ”~~DISCUSSION~~” into a page and nothing happened. Wondering what approach to take next. Thanks. JE MAY 21, 2008

 
plugin/plugin.txt · Last modified: 2008/05/29 19:03 by 138.227.189.10
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate