Extending the "Simple Image Gallery" Plugin

Discuss the development and implementation of Joomla! bots/Plugins here.

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.
Locked
cimarron
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Dec 12, 2006 7:00 pm

Extending the "Simple Image Gallery" Plugin

Post by cimarron » Tue Dec 12, 2006 7:54 pm

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

User avatar
aravot
Joomla! Ace
Joomla! Ace
Posts: 1015
Joined: Thu Aug 18, 2005 1:16 am
Location: Glendale, CA, USA
Contact:

Re: Extending the "Simple Image Gallery" Plugin

Post by aravot » Tue Dec 12, 2006 9:00 pm

Thanks will try later today

User avatar
aravot
Joomla! Ace
Joomla! Ace
Posts: 1015
Joined: Thu Aug 18, 2005 1:16 am
Location: Glendale, CA, USA
Contact:

Re: Extending the "Simple Image Gallery" Plugin

Post by aravot » Fri Dec 15, 2006 7:47 pm

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>';

cimarron
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Dec 12, 2006 7:00 pm

Re: Extending the "Simple Image Gallery" Plugin

Post by cimarron » Sat Dec 16, 2006 1:25 am

Hi.

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>';

Let me know if that works for you.

regards

User avatar
aravot
Joomla! Ace
Joomla! Ace
Posts: 1015
Joined: Thu Aug 18, 2005 1:16 am
Location: Glendale, CA, USA
Contact:

Re: Extending the "Simple Image Gallery" Plugin

Post by aravot » Sat Dec 16, 2006 8:55 am

Thanks, that worked the only thing to remember image extension is required e.g. 'joomla.jpg.desc'

mstillwagon
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Dec 12, 2006 2:02 pm

Re: Extending the "Simple Image Gallery" Plugin

Post by mstillwagon » Wed Jan 03, 2007 4:59 pm

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/)?

bluebledthesea
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Feb 15, 2007 10:00 pm

Re: Extending the "Simple Image Gallery" Plugin

Post by bluebledthesea » Thu Feb 15, 2007 10:03 pm

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/)?
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?

Thank you!  ???

User avatar
izzo
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Thu Aug 13, 2009 11:13 am
Contact:

Re: Extending the

Post by izzo » Fri Apr 26, 2013 2:08 am

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?

User avatar
izzo
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Thu Aug 13, 2009 11:13 am
Contact:

Re: Extending the

Post by izzo » Thu May 02, 2013 11:18 pm

Bueller?

User avatar
izzo
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Thu Aug 13, 2009 11:13 am
Contact:

Re: Extending the

Post by izzo » Mon May 13, 2013 2:00 am

Anyone?


Locked

Return to “Plugins/Mambots”