Forum

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Using Easy Language and Front End News Module

Using Easy Language and Front End News Module 23 Jan 2013 14:58 #925

  • arone
  • arone's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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
The administrator has disabled public write access.

Using Easy Language and Front End News Module 24 Jan 2013 14:09 #927

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
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
The administrator has disabled public write access.

Using Easy Language and Front End News Module 25 Jan 2013 20:08 #928

  • Pablo
  • Pablo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
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.
The administrator has disabled public write access.

Using Easy Language and Front End News Module 27 Jan 2013 14:42 #933

  • arone
  • arone's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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.
This image is hidden for guests. Please log in or register to see it.


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...
The administrator has disabled public write access.

problem not solved : Intro Image removed 28 Jan 2013 11:03 #934

  • arone
  • arone's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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('/&amp;/',' ',$text);
		$text = preg_replace('/&quot;/',' ',$text);
		// $text = htmlspecialchars($text);
		$text = str_replace(array("\r\n", "\n", "\r"), " ", $text);
		$text = preg_replace('/(( )|(&nbsp;))+/',' ',$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!
The administrator has disabled public write access.

problem not solved : Intro Image removed 28 Jan 2013 14:12 #937

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
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
Last Edit: 28 Jan 2013 14:17 by Antonio.
The administrator has disabled public write access.

problem not solved : Intro Image removed 28 Jan 2013 16:50 #943

  • arone
  • arone's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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 :evil: )
The administrator has disabled public write access.

Using Easy Language and Front End News Module 11 Feb 2013 18:18 #991

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.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2