I just renamed my base folder for zenphoto/zenpage, and all pictures and links inserted to articles with tinyzenpage went dead. Maybe the paths should be made relative, or is there no solution for this other than not renaming the base folder?
Sorry, that is not possible as TinyMCE does not allow php code to have dynamic links. It is not possible to make the links inserted relative because the relative is not the same from the actual plugin when you insert an image as the one you have if you view the theme. The cropping of the image inserted uses Zenphoto's image processor `i.php`
From the plugin that would be something like `../../../../i.php...` and viewed from the theme it would be `/zenphoto/zp-core/i.php...`.
If you don't want to change this, it's OK for me (I'm not going to move my zenphoto folder all the time:), but I think it would be good for ZenPhoto to be able to "move around" freely without wrecking content.
That only refers to links at the time they are inserted and tinyZenpage already takes care of that. What you posted does not really solve the issue of links breaking if you afterwards change the name of main folder. No articles or pages will get their included links updated automatically with that. Do you understand the problem?
Ah so it's only for insertion. Yep, I understand the problem. I guess it would be possible to solve it with the php-plugin for tinymce, but if it's not a big deal for people to rename URLs after renaming base folder, then I understand if noone want to spend time on this.
To my knowledge the php-plugin has not been updated for quite a while and is not really compatible with the current TinyMCE version. I Actually made the "codeblocks" as a kind of replacement. But if I missed anything let me know.
Comments
From the plugin that would be something like `../../../../i.php...` and viewed from the theme it would be `/zenphoto/zp-core/i.php...`.
http://wiki.moxiecode.com/index.php/TinyMCE:FAQ#Paths.2FURL.27s_are_incorrect.2C_I_want_absolute.2Frelative_URLs.3F
If we specify the document base URL correct ( for example, base url = /zenphoto/), this should do it I think?
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/document_base_url
Anyway, here is a post about it: http://tinymce.moxiecode.com/punbb/viewtopic.php?id=2182
If you don't want to change this, it's OK for me (I'm not going to move my zenphoto folder all the time:), but I think it would be good for ZenPhoto to be able to "move around" freely without wrecking content.
I guess it would be possible to solve it with the php-plugin for tinymce, but if it's not a big deal for people to rename URLs after renaming base folder, then I understand if noone want to spend time on this.
Thanks for the help!