Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#769 2008-06-18 12:51:37
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
ultramega wrote:
Possible to somehow hide languages which are being worked on the background?
Not at present. That does sound like a useful feature for those who grow their site a language at a time. Will think about it.
— Steve
Offline
#770 2008-06-18 13:21:43
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
ultramega
Turned out to be very easy. Feature added in the development code. If you want to make the change to your installation just edit the plugin and look for this code block…
function l10n_lang_list( $atts )
{
global $thisarticle , $l10n_language, $is_article_list , $pretext, $prefs;
extract(lAtts(array(
'title' => '', # Title will be prepended as a paragraph.
'on404' => '', # Set this to non-blank to force special 404 processing
… replace it with this …
function l10n_lang_list( $atts )
{
global $thisarticle , $l10n_language, $is_article_list , $pretext, $prefs;
extract(lAtts(array(
'title' => '', # Title will be prepended as a paragraph.
'surpress_langs' => '', # Comma separated list of site languages to hide
'on404' => '', # Set this to non-blank to force special 404 processing
Then look for this a little farther down (maybe a page or two) the file…
$list = array();
static $alangs;
$slangs = MLPLanguageHandler::get_site_langs();
… and replace with…
$list = array();
static $alangs;
$slangs = MLPLanguageHandler::get_site_langs();
$surpress_langs = do_list( trim( $surpress_langs ) );
$slangs = array_diff( $slangs , $surpress_langs );
… and save the changes.
Next: edit your page or form that uses the l10n_lang_list
tag. Add surpress_langs="your-lang"
to it’s attributes, save the form and view the result.
Hope that helps.
— Steve
Offline
#771 2008-06-18 13:31:24
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: MLP - The Multi-Lingual Publishing Pack
Ok, good. Would be great possibility to be able to select “active / non-active”. Serving alternative content on section landing pages using “if_lang” mehtod is a one way to manage situation – after basic navigation snippets are on place.
Was it possible to clone articles straight from native articles write tab in newest version? I have 0.7.636 but it doesn’t show any cloning possibility on write page.
And one more to wishlist, if I haven’t already asked this; possibility to clone multiple articles with selectable radio buttons…
Edit. What, you did that in same time I was writing :)
Last edited by ultramega (2008-06-18 13:33:09)
Offline
#772 2008-06-18 13:40:57
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
ultramega
Ok, good. Would be great possibility to be able to select “active / non-active”. Serving alternative content on section landing pages using “if_lang” mehtod is a one way to manage situation – after basic navigation snippets are on place.
Now you lost me.
With the change I made your visitors won’t even know there is a new language in the works. Unless they happen to guess the language code that matches your new backend language and edit the url themselves, they won’t get to a new-language’s section landing page. You therefore shouldn’t need any conditional if_lang
tags.
Was it possible to clone articles straight from native articles write tab in newest version? I have 0.7.636 but it doesn’t show any cloning possibility on write page.
Not possible at present. You can already clone from the Content > MLP > Articles
.
And one more to wishlist, if I haven’t already asked this; possibility to clone multiple articles with selectable radio buttons…
Could you post a mock-up of what you have in mind and explain the behaviour more as I don’t understand your request.
— Steve
Offline
#773 2008-06-18 13:47:45
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: MLP - The Multi-Lingual Publishing Pack
Yes I lost you, just looking the new plugin code.
I was thinking about if there could be same kind select boxes as is in default renditions/articles list (where you can select multiple articles to change status, category or whatever). This kind multi-select ability to MLP-articles list too, to be able to clone multiple articles in same time (when having hundreds, it’s slow to clone each one by one). (If adding new language to old site)
Offline
#774 2008-06-18 13:56:46
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
Ok, now I get what you mean. Yes, that would be really useful for people extending sites.
Let me think about that a little as there might be other ways to achieve the same thing … for example; by having a simple icon at the top of each language column that allows an entire language to be populated with clones of an existing site language (where possible).
— Steve
Offline
#775 2008-06-18 14:11:07
Re: MLP - The Multi-Lingual Publishing Pack
Hiding languages is a useful feature, nice one.
<red pen>
But before you release the code would you object to using suppress_langs
instead of surpress_langs
;-)
</red pen>
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
#776 2008-06-18 14:47:16
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
Bloke
Thanks: done! Now I have to fix the other surpress in that tag’s attribute list.
Wonder if it’s worth causing folks errors on their upgraded sites over a spelling mistake. Hmmm.
— Steve
Offline
#777 2008-06-18 15:55:17
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: MLP - The Multi-Lingual Publishing Pack
Hi, Steve, This will be a very helpful addition.
I like the idea of being able to use check boxes to select renditions/articles to clone. That’d be very useful.
I wouldn’t worry about causing problems if you correct the spelling of “suppress”. Not many of us have installed the new code and those that have installed it lurk here, so they’ll know.
Last edited by azw (2008-06-18 15:55:52)
Offline
#778 2008-06-18 16:09:24
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
azw
Re: spelling; Not that one! Another, previously existing, one that some people might already be using — check the help and you’ll see it.
I’ll mull over the mass-cloning thing a little before posting on it again.
— Steve
Offline
#779 2008-06-18 16:12:31
Re: MLP - The Multi-Lingual Publishing Pack
net-carver wrote:
Re: spelling; … another, previously existing, one that some people might already be using
Sorry to bring it up then. Don’t worry about it and keep it as surpress
for consistency. Let’s face it, the Internet’s been spelling referer wrong for the past 15+ years and that turned out ok :-)
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
#780 2008-06-18 16:28:17
- lonelytraveller
- Member
- From: Firenze, Italy
- Registered: 2008-04-04
- Posts: 45
Re: MLP - The Multi-Lingual Publishing Pack
Hello! I had a look at all the thread, but didn’t find an answer to my problem yet. Since the thread is very long I hope I haven’t missed something and posting a question that has already been answered.
I have used the MLP plug-in successfully on 2 sites (BTW it’s a wonderful solution and it works perfectly!!), but today I tried to install it on a new site, hosted on a different server and I just cannot make it work.
I’m using a clean Txp install (v 4.0.6), so the only plug-ins I have are the l10n, zem_contact_lang-mlp and the gbp_admin_library. I used the same files to install MLP on the 2 sites mentioned above, downloaded from MLP website.
The first time I activated l10n I couldn’t access any any tab in txp, just got a list of php errors. I realised that for some reason none of the l10n_xxxx.php files were created inside the lib directory, so I installed txp again and tried to upload the php files manually, but if I open the content tab (or any other tab) I still get the following error:
Fatal error: Call to undefined function l10n_installed() in /home/sanrocco/public_html/textpattern/lib/txplib_misc.php(574) : eval()'d code on line 305
I’m running textpattern 4.06 on Apache server, Php 5.2.3, MySql 4.1.22-standard and from the Diagnostic tab the only error I get is that the “show_source” function is disabled. All the files and folders seem to have the right permissions.
Does anyone have a suggestion?
Thanks in advance.
Last edited by lonelytraveller (2008-06-18 16:30:48)
Offline