Textpattern Forum

You are not logged in. Register | Login | Help

#731 2008-05-08 07:16:55

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: MLP - The Multi-Lingual Publishing Pack

Any way to customize the permissions for MLP?

Offline

#732 2008-05-08 15:57:57

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

milkshake wrote:

Any way to customize the permissions for MLP?

Not without editing files at present. There are a couple of things in the MLP preferences tab but they are global, not done on a per-user basis.

Can you describe what you want to achieve?


Steve
Textile | My plugins on GitHub | @netcarver

Offline

#733 2008-05-08 21:16:52

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: MLP - The Multi-Lingual Publishing Pack

It seems only users with > managing editor (2) level privs can make clones. Would be nice to be able to adjust this.

Offline

#734 2008-05-09 02:23:01

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

milkshake wrote:

It seems only users with > managing editor (2) level privs can make clones. Would be nice to be able to adjust this.

Yes, that’s right. If you want to change this, edit the l10n plugin and look for the following lines…

if( @txpinterface === 'admin' )
	{
	add_privs( 'l10n.clone' 	, '1,2' );

Just add the user level(s) you want to that comma separated list on the last line shown above and then save your edit.


Steve
Textile | My plugins on GitHub | @netcarver

Offline

#735 2008-05-13 08:41:55

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: MLP - The Multi-Lingual Publishing Pack

Thanks, I should have looked a little more

Offline

#736 2008-05-14 23:14:53

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,987
Website

Re: MLP - The Multi-Lingual Publishing Pack

Happy to see you back, net-carver.
Now, I can ask again for some features :)

1. <txp:l10n_if_article_lang> and <txp:l10n_get_article_lang />

I’ve already requested this here. I put an example on that post, and here is a similar one:
I’m having an issue with Postmaster (I will post in that plug-in thread too):
I send notifications of new articles posted on a TxP site.
The e-mail content is rendered using a TxP form, where you can put built-in txp tags and also tags from Postmaster plug-in.
In those e-mails I want to put the link to the published new article. To achieve this, I can use both <txp:permlink /> or <txp:bab_pm_data display="Link" /> to output the article URL.

The problem is: the output of both tags doesn’t include the language chunk for the URL.
So, if visitors clicks on the link (on the received e-mail), they go to a 404 page.

Confession: this isn’t totally true. This only happens if the link points to an article that belongs to a language that isn’t the default one. In other words (example):

http:///www.site.com/section/english-article-url-title <- although the lang chunk (/en/) is missing, this URL works on a MLP site only for an article url-titled as english-article-url-title and if it belongs to the default/main language.

http:///www.site.com/section/spanish-article-url-title <- this doesn’t work (goes to 404). It’s missing the (/es/) part of the URL, and spanish isn’t the main language.
Just another little confession: that URL will work only if the site visitor has already visited the site and have a cookie with the language set to spanish. But we can’t expect that someone clicking on an e-mail link has already visited our site before and the cookie is still there.

So, the requested tags (particularly, <txp:l10n_get_article_lang />) will let us to manually create URLs on page/forms (particularly, on article forms), like this:
<txp:site_url /><txp:l10n_get_article_lang /><txp:article_url_title />

2. Can renditions (for a same article) belong to different sections?

I should test if this is possible. Do you remember the already rejected request (to have section names translated)?

I was thinking: what if I create two (or more) sections, one for each language, and assign a rendition to its corresponding section/language?

The first problem I see on this approach is: how to “connect” one translated article in a section to the corresponding one in another language/section.
Example: how to link http://www.site.com/en/news/net-carver-is-back to http://www.site.com/es/noticias/net-carver-ha-vuelto

Maybe here is where MLP could do the magic: to have some place on MLP where each section is matched with is correspondent section in other language. For example: sections “news” (english) matches section “noticias” (spanish).
Again, this doesn’t means MLP has to tie a section with a particular language. This is up to the user to follow its own convention about where (which section) to publish a particular article.

I hope this makes sense.

BTW, I’ve made an approach to a TxP bilingual (but it could have been multi) site without using MLP. It was a simple site, few content, and using some txp built-in magic and some plug-ins, I’ve created something acceptable. I will write a tutorial soon.

Of course, nothing beats MLP on creating true (and complex, if needed) multi-lingual sites with TxP.

Last edited by maniqui (2008-05-14 23:15:53)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#737 2008-05-26 11:09:19

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

How upgrading TXP-itself (to the latest 4.06 version) is going to affect MLP, if any? And what would be the best way update, when having several languages and looooots of translated articles, snippets and so on? I just asked about upgrade in general here.

Offline

#738 2008-05-26 11:39:20

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,987
Website

Re: MLP - The Multi-Lingual Publishing Pack

I’ve upgraded a MLP-powered site from 4.05 to 4.06 without any hassle.
Look on the last 5 or 10 pages of this thread for a “patch” (not really needed) I posted of the txplib_db.php file. It has minor differences, but I think ruud or netcarver stated somewhere that this differences won’t bring any problem for a MLP site.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#739 2008-05-26 14:07:24

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

Re: MLP - The Multi-Lingual Publishing Pack

After installing and activating zem_contact_lang-mlp I’m getting:

Fatal error: Cannot redeclare zem_contact_gtxt() (previously declared in /users/home/domains/site.com/web/public/textpattern/lib/txplib_misc.php(574) : eval()’d code:2) in /users/home/domains/site.com/web/public/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 75

Anyone know where I’ve done wrong, I’m using 4.06?

Best wishes
Lee

Offline

#740 2008-05-26 14:14:33

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,502
Website

Re: MLP - The Multi-Lingual Publishing Pack

You should remove zem_contact_lang if you have zem_contact_lang_mlp installed.

Offline

Board footer

Powered by FluxBB