Benvenuto,
Ospite
|
|
|
Hi !
This plugin is just wonderful, thank you very much for your work ! It's working great on my website except with modules designed to display a (short) preview of (a selection of) articles in a module... I tried with modules like Latest News (native module), NewsDisplay, Mini Frontpage, Mod News Pro GK4 without any success. The articles are shown as expected but they don't take in account the language. They display all the languages ! (They don't take in account the tag {lang en}...{/lang} and {lang fr}...{/lang} ) but all those modules display the title of the module/articles in the correct language Is there any way to fix that, or any module doing this job and working properly with Easy Language? This plugin is exactly what I need, and it would be disappointing to have to give it up because it's not working with any Front End News Module. Thanks a lot for your help! Enora |
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Unfortunately, the plugin works over what is printed on the screen, so if another module does not print the text completely, this problem occurs.
The only solution is to modify the modules to be replaced the text correctly before it is printed. In the new version we are working on, we have integrated the patches that solve these problems in standard modules. If you want to tell us exactly where and under what modules (with a few screen) you have these problems in order to integrate them. |
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie Help us by voting our extensions on Joomla.org: JiFile JoomPhoto Mobile Easy Language
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Hi Arone, I have just had this problem occur to me. As Antonio suggests the fix will have to be made in the particular news module you are using.
I was using RokTabs, but Im pretty sure others will handle displaying articles in a similar fashion. In your modules folder, find the module which handles the display of your articles. In this folder there will be a script which grabs your articles and takes the part to be displayed (In Roktabs this is helper.php) In here you need to search for the part that is stripping your articles of the language tags i.e. {lang en} {/lang} etc. In roktabs it was a preg_replace function call on my article text, so I just commented this out and easy language worked. So in summary in your module script do a search for preg_replace or regexp and prevent the language tags being stripped from your articles. |
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Thanks to both of you for your great support!
Antonio, I joined a print screen of the issues using the DisplayNews module. Your plugin is just wonderful, I love it! Thanks so much for your work. Questa immagine è nascosta ai visitatori. Prego accedi o registrati per visualizzarli. Pablo, your trick worked ! I wonder if there is a trick to add an execption for the {lang} tag instead of allowing all the {tag} (it would be essential as many plugin are also using thoses tags (content anywhere and module anywhere for instance). That's what I did : I commented (add // at the beginning of the line) this line in modules/mod_dn/helper.php $text = preg_replace('/{.+?}/','',$text); You are both genius ! P.S: Joomfish and Falang are really really dead... |
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Finally the edit is working for easy language BUT it's also ripping off the Intro Image.
here is the code from the helper.php // Function to filter html code and special characters from text
function dn_filter( $text ) {
$text = preg_replace('@<div[^>]*class=(["\'])mosimage_caption\\1[^>]*>[^>]*</div>@', '', $text );
/**
* Remove HTML tags, including invisible text such as style and
* script code, and embedded objects. Add line breaks around
* block-level tags to prevent word joining after tag removal.
http://nadeausoftware.com/articles/2007/09/php_tip_how_strip_html_tags_web_page
*/
$text = preg_replace(
array(
// Remove invisible content
'@<head[^>]*?>.*?</head>@siu',
'@<style[^>]*?>.*?</style>@siu',
'@<script[^>]*?.*?</script>@siu',
'@<object[^>]*?.*?</object>@siu',
'@<embed[^>]*?.*?</embed>@siu',
'@<applet[^>]*?.*?</applet>@siu',
'@<noframes[^>]*?.*?</noframes>@siu',
'@<noscript[^>]*?.*?</noscript>@siu',
'@<noembed[^>]*?.*?</noembed>@siu',
// Add line breaks before and after blocks
'@</?((address)|(blockquote)|(center)|(del))@iu',
'@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',
'@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',
'@</?((table)|(th)|(td)|(caption))@iu',
'@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',
'@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',
'@</?((frameset)|(frame)|(iframe))@iu',
),
array(
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
"\n\$0", "\n\$0", "\n\$0", "\n\$0", "\n\$0", "\n\$0",
"\n\$0", "\n\$0",
),
$text );
$preserv = "<img>";
$preserv .= $this->params->get("preserve_tags");
$text = strip_tags($text, /* exclude */ $preserv );
// $text = preg_replace("'<script[^>]*>.*?</script>'si","",$text);
/* $text = preg_replace("@<script[^>]*?>.*?</script>@si","",$text); */
//*******************************This is the line I have commented ***************************************//
$text = preg_replace('/{.+?}/','',$text);
//********************************************************************************************************//
// $text = preg_replace('/&/',' ',$text);
$text = preg_replace('/"/',' ',$text);
// $text = htmlspecialchars($text);
$text = str_replace(array("\r\n", "\n", "\r"), " ", $text);
$text = preg_replace('/(( )|( ))+/',' ',$text);
$text = trim($text);
return $text;
} Any idea to add a single exception instead of removing the whole line ? Thanks a lot for your help! |
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
I saw how to work the module, can be solved preserving the functioning of modNews, then without commenting that function. But I have to modify Easy Language, and add code on the helper.php.
But I can not do it now because this is not my work and I would not have time, but if you have an "emergency" you can contact me by email to give accelerated. |
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie Help us by voting our extensions on Joomla.org: JiFile JoomPhoto Mobile Easy Language
Ultima modifica: 28/01/2013 14:17 da Antonio.
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Ok, I am looking forward to getting your next release or the update. Thanks for your work and your time !
(I won't bother you by sending you email every evening ![]() |
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Is this the same that causes problems in Articles Category modules?
In Articles Category modules only the first tag is removed? Så shows the tags like: A title{/lang uk}{lang it}un titolo{/lang it} Can't seem to find out what strips the first tag. |
L\'Amministratore ha disattivato l\'accesso in scrittura al pubblico.
|
|
Facendo click su qualunque link della pagina si accetta il loro utilizzo. Per saperne di piu'