Custom plugin files
-
TheArgh
- Regular
- Posts: 6
- Joined: Wed Mar 29, 2006 1:33 pm
- Location: Second planet from that big fiery ball
- Contact:
Custom plugin files
I a writing a plugin that needs to create a number of files for caching purposes as well as storing other data. Is there a standard location for plugins to save files to, or can I decide on my own where to put them? An ideal location would be any of those that have to be writeable for serendipity to function properly, like the serendipity root folder where the initial configuration is written to... My plugin currently creates a custom subfolder in the root serendipity folder (/cache) to store the files.
Anthéa, 5800-pixel wide extravaganza (fr) - and the Almighty Argh!
-
TheArgh
- Regular
- Posts: 6
- Joined: Wed Mar 29, 2006 1:33 pm
- Location: Second planet from that big fiery ball
- Contact:
Sure, outside the www-root is better for cache files, but automatically determining a folder location is not practical anymore then - the user has to set a path in the plugin's configuration then, and I would prefer to avoid that... I guess there is no other way unless Serendipity offered file repositories for plugins outside the www-root and in the www-root that can be accessed via serendipity's API.
Anthéa, 5800-pixel wide extravaganza (fr) - and the Almighty Argh!
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
You should use the "archives" or "templates_c" directory. Both are enforced as being writable by serendipity.
It's advised you create your own subdirectory in any of those. Templates_c is my actual favourite.
Best regards,
Garvin
It's advised you create your own subdirectory in any of those. Templates_c is my actual favourite.
Best regards,
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/
# 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/
-
TheArgh
- Regular
- Posts: 6
- Joined: Wed Mar 29, 2006 1:33 pm
- Location: Second planet from that big fiery ball
- Contact:
Hi Garvin,
Thanks for the info, I will use the templates_c folder then and create a subfolder for my plugin there.
Thanks for the info, I will use the templates_c folder then and create a subfolder for my plugin there.
Anthéa, 5800-pixel wide extravaganza (fr) - and the Almighty Argh!