"Path to single plugin"

Creating and modifying plugins.
Post Reply
tpost
Regular
Posts: 77
Joined: Fri Sep 21, 2007 1:45 am

"Path to single plugin"

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: "Path to single plugin"

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply