Extending the "Simple Image Gallery" Plugin
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Dec 12, 2006 7:00 pm
Extending the "Simple Image Gallery" Plugin
Hello:
If you need more flexibility in the description of images, you can use the following hack:
Around line 60 of plugin_jw_sig.php, you can add this code:
$_description=$mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].".desc";
if(file_exists($_description)) {
$_message_= file_get_contents($_description);
}else{
$_message_ = $param->get('message', 'You are browsing images from the article:');
}
This code retrieves the content of a file named "name_of_image.desc" (if it exists) and use it instead of the default value.
So you just need to upload a text file with the same name of the image (plus extension .desc) and that text will be displayed.
Regards
If you need more flexibility in the description of images, you can use the following hack:
Around line 60 of plugin_jw_sig.php, you can add this code:
$_description=$mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].".desc";
if(file_exists($_description)) {
$_message_= file_get_contents($_description);
}else{
$_message_ = $param->get('message', 'You are browsing images from the article:');
}
This code retrieves the content of a file named "name_of_image.desc" (if it exists) and use it instead of the default value.
So you just need to upload a text file with the same name of the image (plus extension .desc) and that text will be displayed.
Regards
- aravot
- Joomla! Ace
- Posts: 1015
- Joined: Thu Aug 18, 2005 1:16 am
- Location: Glendale, CA, USA
- Contact:
Re: Extending the "Simple Image Gallery" Plugin
Thanks will try later today
- aravot
- Joomla! Ace
- Posts: 1015
- Joined: Thu Aug 18, 2005 1:16 am
- Location: Glendale, CA, USA
- Contact:
Re: Extending the "Simple Image Gallery" Plugin
Tried it did not work, can you say where exactly the code goes, I inserted the code after
Code: Select all
$html .= '<div class="sig_cont"><div class="sig_thumb"><a href="'.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].'" rel="lightbox[sig]" title="'.$_message_.'<br /><b>'.$itemtitle.'</b>" target="_blank"><img src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/showthumb.php?img='.$_images_dir_.'/'.$images[$a]['filename'].'&width='.$_width_.'&height='.$_height_.'&quality='.$_quality_.'"></a></div></div>';
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Dec 12, 2006 7:00 pm
Re: Extending the "Simple Image Gallery" Plugin
Hi.
Thanks for your test.
Actually it goes above the line you mentioned
Let me know if that works for you.
regards
Thanks for your test.
Actually it goes above the line you mentioned
Code: Select all
for($a = 0;$a<=$noimage;$a++) {
if($images[$a]['filename'] != '') {
$_description=$mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].".desc";
if(file_exists($_description))
{
$_message_= file_get_contents($_description);
}else{
$_message_ = $param->get('message', 'You are browsing images from the article:');
}
$html .= '<div class="sig_cont"><div class="sig_thumb"><a href="'.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a]['filename'].'" rel="lightbox[sig]" title="'.$_message_.'<br /><b>'.$itemtitle.'</b>" target="_blank"><img src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/showthumb.php?img='.$_images_dir_.'/'.$images[$a]['filename'].'&width='.$_width_.'&height='.$_height_.'&quality='.$_quality_.'"></a></div></div>';
regards
- aravot
- Joomla! Ace
- Posts: 1015
- Joined: Thu Aug 18, 2005 1:16 am
- Location: Glendale, CA, USA
- Contact:
Re: Extending the "Simple Image Gallery" Plugin
Thanks, that worked the only thing to remember image extension is required e.g. 'joomla.jpg.desc'
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Dec 12, 2006 2:02 pm
Re: Extending the "Simple Image Gallery" Plugin
Am I missing something here? I tried it and can't get it to work. Do I need to alter the code if my images reside in a subdirectory (stories/sample/)?
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Feb 15, 2007 10:00 pm
Re: Extending the "Simple Image Gallery" Plugin
I'm also having a problem getting the captions to show. I'm positive I put the code in the exact location that was instructed. My images are in stories/otherfolder and are called tour1.jpg, tour2.jpg, etc. I've added files containing the description called tour1.jpg.desc, tour2.jpg.desc, etc. in the same folder where my images reside. What could I possibly be missing or doing wrong? Am I supposed to alter the additional code if my images are in a special folder?mstillwagon wrote: Am I missing something here? I tried it and can't get it to work. Do I need to alter the code if my images reside in a subdirectory (stories/sample/)?
Thank you!
- izzo
- Joomla! Apprentice
- Posts: 35
- Joined: Thu Aug 13, 2009 11:13 am
- Contact:
Re: Extending the
I know this is an old thread, but it might as well be what I need.
Just installed the plugin - v2.2 on J2.5, all good and dandy, however it is 6 years later (since when the thread was made...)
There is no plugin_jw_sig.php!!!! The ONLY php file I am finding is jw_simpleImageGallery.php...
Any idea?
Just installed the plugin - v2.2 on J2.5, all good and dandy, however it is 6 years later (since when the thread was made...)
There is no plugin_jw_sig.php!!!! The ONLY php file I am finding is jw_simpleImageGallery.php...
Any idea?
- izzo
- Joomla! Apprentice
- Posts: 35
- Joined: Thu Aug 13, 2009 11:13 am
- Contact:
Re: Extending the
Bueller?
- izzo
- Joomla! Apprentice
- Posts: 35
- Joined: Thu Aug 13, 2009 11:13 am
- Contact:
Re: Extending the
Anyone?