Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2016-11-15 23:01:57

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#26 2016-11-16 07:38:45

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

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

#27 2016-11-16 08:14:09

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

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

#28 2016-11-16 08:18:12

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

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

#29 2016-11-16 09:02:24

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#30 2016-11-16 09:47:49

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

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

#31 2016-11-16 10:14:59

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

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

#32 2016-11-16 10:42:39

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

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

#33 2016-11-16 11:33:02

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#34 2016-11-16 11:56:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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

Online

#35 2016-11-16 12:03:52

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: Two textpattern instances with one image folder

Yeah sometimes trying something odd can throw new directions of solving some problems.

Offline

#36 2017-10-24 10:13:49

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

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

Board footer

Powered by FluxBB