Textpattern Forum

You are not logged in. Register | Login | Help

#701 2008-04-07 11:52:01

michaelb
Member
From: London, UK
Registered: 2008-04-02
Posts: 21

Re: MLP - The Multi-Lingual Publishing Pack

Our txp is installed in a subdirectory, and Art (azw) has suggested I post a short hack I made to zem_contact_reborn, which now seems to work ok with MLP.

So here goes:

Line 3: add $thisarticle to the list of global variables declared.

Line 161: remove global $thisarticle; because you’ve already declared it.

Line 286: change the form ‘action’, by replacing this:
htmlspecialchars(serverSet('REQUEST_URI'))
with this:
hu.l10n_get_lang().'/'.$thisarticle['section'].'/'.$thisarticle['url_title']

Caution: this won’t work if you have a query string at the end of the URL – it’s just for URLs with the section/title structure.

Last edited by michaelb (2008-04-07 12:01:38)

Offline

#702 2008-04-07 12:18:25

michaelb
Member
From: London, UK
Registered: 2008-04-02
Posts: 21

Re: MLP - The Multi-Lingual Publishing Pack

And here’s a quick hack to add a filter to the MLP -> Snippets -> Forms admin page, so that you can filter on the names of forms.

I find this really handy, as we have more than 130 txp forms, and it was becoming very laborious to trawl through all their names to find the one I wanted to edit.

Edit \textpattern\lib\l10n_admin_classes.php

After line 2462 which reads case 'form': add the following lines:

$out[] = "<script type=\"text/javascript\" src=\"jquery.js\"></script>";

$out[] = "<script> $(document).ready(function(){ $('#inline-search').
search('#l10n_forms li'); }); $.fn.search = function(searchElements) {
$(this).keyup(function(){ var searchString = $(this).val();
 if (searchString.length > 0){ $(searchElements).hide(); 
$(searchElements+':contains(' +searchString+ ')').show(); } 
else { $(searchElements).show(); } }); }; </script>
<div style=\"text-align:left;\"><label>Filter</label><br />
<input type=\"text\" id=\"inline-search\" /></div>";

Last edited by michaelb (2008-04-07 12:23:54)

Offline

#703 2008-04-11 15:24:14

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: MLP - The Multi-Lingual Publishing Pack

Anyone know if it is possible to add a 3rd language to a site? Is it just a case of adding the language in admin and proceeding as normal?

Cheers
Lee

Offline

#704 2008-04-16 17:18:01

frangarcia
Member
From: Elche
Registered: 2005-11-14
Posts: 13
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi, I’m having a problem using this amazing plugin and it’s the next one. I’ve installed the plugin without problems in a hosting server that doesn’t allow to use the mod_rewrite module, so I am thinking how can I use this plugin without using the mod_rewrite. Can I set a variable to view the site in a specific language?

I’ve read the code, but I haven’t found any solution for this problem. Can anybody help me?


What doesn’t kill you, makes you stronger

Offline

#705 2008-04-17 03:28:51

azw
Member
Registered: 2007-01-29
Posts: 277

Re: MLP - The Multi-Lingual Publishing Pack

lee wrote:

Anyone know if it is possible to add a 3rd language to a site? Is it just a case of adding the language in admin and proceeding as normal?

I think it works fine, but I’ve only done a quick test.

I added the new language in Admin > Preferences > Language

Then I added the new language code (like fr-fr or en-us) to the list in the first text box on the Content > MLP > Preferences page. (Be sure that the first language in that box is the default language.)

Languages en-us,es-es,fr-fr ?

Then I was able to clone an old article into the new language.

Let us know how it goes.

Offline

#706 2008-04-17 03:39:44

azw
Member
Registered: 2007-01-29
Posts: 277

Re: MLP - The Multi-Lingual Publishing Pack

frangarcia wrote:

…. a hosting server that doesn’t allow to use the mod_rewrite module

Would it work if you used messy URLs?

In Admin > Preferences > Basic, you’ve got a drop-down select box where you can choose:

Permanent link mode ?=messy ?

That might work, although I’ve not tested it. I’d guess that any of the clean URLS would fail without mod_rewrite.

Then again, most good hosts offer mod_rewrite. Why not move to a better host?

Offline

#707 2008-04-17 11:05:31

frangarcia
Member
From: Elche
Registered: 2005-11-14
Posts: 13
Website

Re: MLP - The Multi-Lingual Publishing Pack

Yes, I have my installation with the messy mode, but this plugin needs to work the mod_rewrite and I need to tune the plugin. Anybody can help me? AN easy solution would be to change to hosting but we’ve just bought it.


What doesn’t kill you, makes you stronger

Offline

#708 2008-04-17 17:00:19

azw
Member
Registered: 2007-01-29
Posts: 277

Re: MLP - The Multi-Lingual Publishing Pack

When no one answers a question on the forum, I think that usually means that no one knows the answer. We read the questions but have nothing that would help. Unfortunately, I don’t think the creator of the software is checking this forum at this time, so you’ll have to do the work yourself without guidance. And you may be trying to do something completely new.

That makes me think you’re looking at a lot of work. It’ll probably take you many hours, maybe days. Worse, you’ll have to keep changing it with every update of the software. That’ll be a major hassle (unpleasant task) every 6 months or so.

Often hosts offer a free trial of 14 days or something similar. I’d ask the host to refund your money because the service doesn’t meet your needs. But hosting is cheap. Even if they don’t refund your money, I’d go else where. I think you’ll be happier in the end.

You can PM me for a recommendation of a very good host.

Offline

#709 2008-04-24 18:27:01

azw
Member
Registered: 2007-01-29
Posts: 277

Re: MLP - The Multi-Lingual Publishing Pack

Does anyone have a French language pack for MLP for both of these?
l10n [admin]
zem_contact_lang-mlp [public]

Maniqui, does your Spanish language pack include the lIOn Admin strings in Spanish?

We need a common place from which we can download the language packs. I think NetCarver’s site would be the logical place, if he’d be open to that.

Last edited by azw (2008-04-24 18:46:20)

Offline

#710 2008-04-24 18:48:37

michaelb
Member
From: London, UK
Registered: 2008-04-02
Posts: 21

Re: MLP - The Multi-Lingual Publishing Pack

I think you’d be able to find a french translation for the zem_contact_lang text here?

http://www.fpradignac.com/atelier/?id=37&c=A-TXP

Offline

Board footer

Powered by FluxBB