Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Two textpattern instances with one image folder
This plugin should use non-prefixed txp_image
table on the admin side:
# Name: abc_prefix v0.1
# Type: Admin/AJAX plugin
#
# Author:
# URL:
# Recommended load order: 5
# .....................................................................
# This is a plugin for Textpattern CMS - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................
YToxMTp7czo0OiJuYW1lIjtzOjEwOiJhYmNfcHJlZml4IjtzOjY6ImF1dGhvciI7czowOiIi
O3M6MTA6ImF1dGhvcl91cmkiO3M6MDoiIjtzOjc6InZlcnNpb24iO3M6MzoiMC4xIjtzOjEx
OiJkZXNjcmlwdGlvbiI7czowOiIiO3M6NDoiY29kZSI7czoyNzY6InJlZ2lzdGVyX2NhbGxi
YWNrKCdhYmNfcHJlZml4JywgJ2ltYWdlJywgJycsIDEpOw0KDQpmdW5jdGlvbiBhYmNfcHJl
Zml4KCRldmVudCwgJHN0ZXApIHsNCiAgICBnbG9iYWwgJERCOw0KICAgIC8vIFJlcGxhY2Ug
YXMgYXBwcm9wcmlhdGUuDQogICAgJERCLT50YWJsZV9wcmVmaXggPSAnJzsNCiAgICAvLyBF
bnN1cmUgdGhhdCBjb3JyZXNwb25kaW5nbHkgcHJlZml4ZWQgdGFibGVzIHR4cF9pbWFnZSwg
dHhwX2NhdGVnb3J5LCB0eHBfdXNlcnMgZXQgdHhwX3ByZWZzIGV4aXN0Lg0KfSI7czo0OiJ0
eXBlIjtzOjE6IjQiO3M6NToib3JkZXIiO3M6MToiNSI7czo1OiJmbGFncyI7czoxOiIwIjtz
OjQ6ImhlbHAiO2I6MDtzOjM6Im1kNSI7czozMjoiM2IxMWY5N2YxMzE2NDY0MmYxZjRhYzJl
NTE0YjZjMzIiO30=
Offline
Re: Two textpattern instances with one image folder
Hell Yeah! Thanks a lot. You made my day.
Tried it first in 4.5.7 but there it did not work. 4.6.2 works fine.
So I will have to trie to update a couple of plugins now. Would have to do that anyway.
4.6.2 and etc rock! ;-)
Offline
Re: Two textpattern instances with one image folder
Just a little info:
I got rid of bot_image_upload because it was not working on 4.6.2 and I installed your abc_article_image which I like a lot. Unfortunately it does not work together with abc_prefix.
I dont want to expand your time on that too much. But if there would be an easy solution for that I would be more than glad to hear it.
Last edited by demoncleaner (2016-11-16 08:14:39)
Offline
Re: Two textpattern instances with one image folder
Hi
I should explain more my idea i think.
The two install share the same DB and intsall 2 has a prefix, then delete prefix_txp_image table (or rename it) and create a view of txp_image like this :
CREATE VIEW prefix_txp_image AS SELECT * FROM txp_image
After that change in the txp admin pref the directory to the image of the install 2 to point to the image directory of the intsall 1, then you will see images on both image tab install, i am not sur you can handle images (upload and delete) in the two install but you can test it, in local wamp server that works (relative path to the image folder on windows but not sure if that work on linux server).
Hope i am more clearer.
Cheers.
Offline
Re: Two textpattern instances with one image folder
An alias is a brilliant idea, if it works, even more if it’s writable. I have never tried it, will do, thanks @Dragondz!
Offline
Re: Two textpattern instances with one image folder
I tried it. All seems to work fine. This seems to be the best solution.
I can confirm that on Linux image folder set to “../images” is working.
Have to play around with it more. Two thumbs up Dragondz!
Offline
Re: Two textpattern instances with one image folder
I have to say that this opens a new dimension for me.
Because it makes me handle categories and plugins the same centralized way.
Tried it and haven´t found any problem yet.
Offline
Re: Two textpattern instances with one image folder
Yes, When tryed it the first time i was surprised that worked too! But i dont know if there problems about that solution, better make good tests about it.
Happy that you find it useful Oleg and demon
Offline
Re: Two textpattern instances with one image folder
These simple SELECT *
views should be updatable and insertable, probably even alterable. So everything should work, very cute!
Offline
Re: Two textpattern instances with one image folder
@Dragondz: that’s bloody brilliant! Never thought of using a VIEW like that. Wow.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Two textpattern instances with one image folder
Yeah sometimes trying something odd can throw new directions of solving some problems.
Offline
Re: Two textpattern instances with one image folder
Hey guys!
So is this still a viable way to tackle multi-lingual publishing needs? Similarly, is it better than trying to wrestle with a fidgety MLP (which I’m scared to do for a client site)?
I’ve never setup a multilingual site or ever tried to use the multi-site functionality. But if the client owns and maintains .com, .fr, and .de domains, the multi-site approach to multilingual publishing seems reasonably attractive. In some ways, perhaps, even more logical as far as the editorial workflow goes and keeping content localized to it’s own identical system.
Status? Thoughts?
Offline