Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

How can I create a single line description thumbnail with multiple line pop up ?

  • Grant Oliver
  • Grant Oliver's Avatar Topic Author
  • Offline
  • New Member
More
16 years 11 months ago - 16 years 11 months ago #14329 by Grant Oliver
Hi All,

Does anyone have any idea how to create a single line description on the thumbnails but have a multiple line description on the pop up ?

Any assistance would be greatly appreciated.



Grant

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
16 years 11 months ago - 16 years 11 months ago #14330 by JoomlaWorks Support Team
Hi my friend!

Let's do that!

First of all let's create a new labels.txt file with the schema
image1.jpg|single line description for image1|multiple line description on the pop up<br>using the br to break the lines
image2.jpg|single line description for image2
and safe it as UTF-8!

After that open to edit the file plugin_jw_sigpro.php
and let's modify some lines to the next code!
Line 116
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".$temp[0])]['intro'] = $temp[1];
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".$temp[0])]['main'] = $temp[2];

Line 282
if ( $labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main']!="" ) {
 $html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main'],ENT_QUOTES).'</b>';
} else {
 $html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro'],ENT_QUOTES).'</b>';
}

Line 304
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro']!="") {

and Line 310
$final_caption = htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro'],ENT_QUOTES);

Check it out and tell me if this is working for you!  ;)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Grant Oliver
  • Grant Oliver's Avatar Topic Author
  • Offline
  • New Member
More
16 years 10 months ago #14331 by Grant Oliver
Thanks,

I`ll try it this evening and let you know how I get on.




Grant

Please Log in or Create an account to join the conversation.

More
16 years 10 months ago #14332 by Jill Clarke
Is this going to be standard functionality in the next version, which is due about now?

Jill

Please Log in or Create an account to join the conversation.

More
16 years 10 months ago #14333 by DTLeo
I have change the code as ABOVE
Line numbers where not correct but give good indication of code to change
It is working. ;) Now I will start to rewrite/write my labels.txt for my site

Thanks

Leo
www.deceptiontours.nl

Please Log in or Create an account to join the conversation.

  • Grant Oliver
  • Grant Oliver's Avatar Topic Author
  • Offline
  • New Member
More
16 years 10 months ago #14334 by Grant Oliver
Hi George,

Played around with it a bit more today and got it working perfectly

Thanks again,



Grant

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
16 years 10 months ago #14335 by JoomlaWorks Support Team

Is this going to be standard functionality in the next version, which is due about now?

Jill


Probably will be include this in the next version!  :)
In this version you can use only one sentence per image
and it will appear to the thumbnail and to the popup!

Thank you!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
16 years 10 months ago #14336 by michelvana

Hi my friend!

Let's do that!

First of all let's create a new labels.txt file with the schema

image1.jpg|single line description for image1|multiple line description on the pop up<br>using the br to break the lines
image2.jpg|single line description for image2
and safe it as UTF-8!

After that open to edit the file plugin_jw_sigpro.php
and let's modify some lines to the next code!
Line 116
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".$temp[0])]['intro'] = $temp[1];
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".$temp[0])]['main'] = $temp[2];

Line 282
if ( $labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main']!="" ) {
 $html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main'],ENT_QUOTES).'</b>';
} else {
 $html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro'],ENT_QUOTES).'</b>';
}

Line 304
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro']!="") {

and Line 310
$final_caption = htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro'],ENT_QUOTES);

Check it out and tell me if this is working for you!  ;)


Hi,

I am using Joomla 1.5 and as far as I can see in plugins > content or plugins > content > jwsigpro there is no file called "plugin_jw_sigpro.php". I would definetely like to use this solution. Any idea?

Regards,

Michel

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
16 years 10 months ago #14337 by JoomlaWorks Support Team
Hi my friend!

We renamed the file plugin_jw_sigpro.php to jwsigpro.php for the joomla!1.5 version!

Thank you!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #14338 by christina rice
In the Joomla 1.5 version, what are the line numbers in jwsigpro.php?  They don't seem to be the same as the earlier version.

thanks

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #14339 by kimberley wesson
Sorry for being dim, but where is this .php file? The only .php file I can find for simple gallery is sigpro_engine.php in the folder /public_html/cfc/mambots/content/plugin_jw_sigpro

I am using v. 1.0.15

Thanks.

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #14340 by boluak

Sorry for being dim, but where is this .php file? The only .php file I can find for simple gallery is sigpro_engine.php in the folder /public_html/cfc/mambots/content/plugin_jw_sigpro

I am using v. 1.0.15

Thanks.


according to vinikey in earlier post all you need to do for joomla 1.5 version is:

1. Open jwsigpro.php found in your \joomla!_root_folder\plugins\content [for you, that will  be: /public_html/cfc/mambots/content/jwsigpro.php] with your favourite text editor, preferable one with good search functionality.      (would be good If you make a backup)

2. On line 162, replace this string:
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".trim(strtolower($temp[0])))] = $temp[1];

With:
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".trim(strtolower($temp[0])))] ['intro']= $temp[1];
$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_."/".trim(strtolower($temp[0])))] ['main']= $temp[2];

Note your line numbers may have changed by now, search function of your editor would be usefull

3. On line 322  or find
if (@$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {

Replace with:
if (@$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main']!="") {

4. On line 324 or find
$html .= '<a href=\''.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a].'\' target=\'_blank\'><b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'</b></a>';

Replace with:
$html .= '<a href=\''.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a].'\' target=\'_blank\'><b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main'],ENT_QUOTES).'</b></a>';

5. On line 326, find
$html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES).'</b>';
Replace with:
$html .= '<b>'.htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['main'],ENT_QUOTES).'</b>';

6. On line 345, find
if (@$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {

Replace with:
if (@$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro']!="") {
7. On line 351
$final_caption = htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES);
Replace with:
$final_caption = htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]['intro'],ENT_QUOTES);

That should do it! ;D

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #14341 by Color Consult AB
Would this hack also make it possible to show the thumbnails without text but let the large images have the text?

Thanks


Jan Suhr
Stockholm, Sweden.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum