Page 1 of 1

"Path to single plugin"

Posted: Tue Apr 22, 2008 12:44 am
by tpost
Hi everyone,

Under "Configuration --> Permalinks", there is an entry called "Path to single plugin".
How does this work?

Say I want to link to a file within a plugin directory, how would I link to it?

Right now, I have "Path to single plugin" set to "plugin".

So on my blog, would i link to it link this?
www.mydomain.com/S9y/[b]plugin[/b]/serendipity_event_blahblah/info.txt

Thanks for reading!

Re: "Path to single plugin"

Posted: Tue Apr 22, 2008 10:25 am
by garvinhicking
Hi!

The "single plugin" is more like the permalink for an external plugin event hook. This does NOT correspond with actual paths to the plugins subdirectory. You should actually not change that permalink (unless you know what you do) because some plugins contain the "plugin" path hardcoded and would break. Examples for such single plugins are the Captcha plugin that displays a random Captcha image through /blog/plugin/captcha_xyz.

To link to a file in your plugin directory, you should simply like to "/plugins/yourplugindir/yourfile.txt". Note, howerver, that if you use the ".html" extension and mod_Rewrite that this might not be valid. For that to work you would need to place a .htaccess file inside your single plugin directory with the content "RewriteEngine Off" so that files inside that directory can be called without URL rewriting.

HTH,
Garvin