Go!
 
 
May 16, 2008, 05:41:50 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Lightbox Effect on Gallery Thumbs instead?  (Read 24489 times)
daclina
Newbie
*
Offline Offline

Posts: 10


View Profile
« on: March 15, 2007, 09:36:04 AM »

Hello,

I was wondering if it is at all possible to get the lightbox effect @ the gallery thumbs, instead of only once you have loaded the page with the single full size image - basically to replace the full page link with the lightbox effect + slideshow (perhaps). Thanx in advance.
Logged
nickmgray
Newbie
*
Offline Offline

Posts: 7


View Profile
« Reply #1 on: March 15, 2007, 09:11:44 PM »

I was hoping for this same feature as well.  I installed Easy Gallery just recently and it gets tiresome to click on an gallery then the image and then click on the image one more time to view it in a larger size.  Would it be possible to have the Lightbox effect added to the thumbnails is future updates?
Logged
weber
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #2 on: March 22, 2007, 05:55:04 AM »

yes! I want it too!!!!!!!!!
I even try to modify the code, I copy the onlick lightbox something to the show photo area, replacing the photo_url, and also add javascript to headding part. however, even the lightbox show, there is no photo inside. can u tell me how?
Logged
Adam
Administrator
Hero Member
*****
Offline Offline

Posts: 4.253



View Profile WWW
« Reply #3 on: March 22, 2007, 11:48:16 AM »

not a bad idea, will have a look at it.
Logged

- Joomla developer -

IMPORTANT: http://www.joomla-addons.org/option,com_smf/Itemid,7/topic,1332.0.html
Do not send support requests by PM. Post on the forum in stead.
weber
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #4 on: March 22, 2007, 03:13:11 PM »

ok, i got it

<a href="javascript:void(0);" onclick="Lightbox.show('<?php echo $mainframe->getCfg('live_site') . '/images/stories/easygallery'. $eg_original_path . '/' . $photo->path; ?>','<?php echo $photo->name; ?>');"><img src="<?php echo $mainframe->getCfg('live_site') . $eg_thumbnail_path . '/' . $photo->path; ?>" border="0" alt="<?php echo $photo->name; ?>" />

but the '/images/stories/easygallery' looks stupid, can you tell me how to replace with system valuable?

Logged
weber
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #5 on: March 22, 2007, 03:14:37 PM »

in case anyone do the same thing, don't forget to add javascript to the heading...
Logged
weber
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #6 on: March 22, 2007, 03:39:01 PM »

ok, no more problem....

in function showCategory($row, $subcats, $photos, $pageNav, $params) part,
claim $eg_original_path

add javascript to heading part, don't know which one, but i add them all
    $mainframe->addCustomHeadTag('<leasygallery/slimbox/css/slimbox.css"
    $mainframe->addCustomHeadTag('<scy/slimbox/js/mootools.js"></script>');
    $mainframe->addCustomHeadTag('<scry/slimbox/js/slimbox.js"></script>');
    $mainframe->addCustomHeadTag('<lallery/style.css" rext/css" />');

the about code is not correct(just part of them), please just copy from other part in the same file, no changes need to made

final, instead of link the photo to image <a href=<php echo $link   locate this part, change to

<a href="javascript:void(0);" onclick="Lightbox.show('<?php echo $mainframe->getCfg('live_site') . $eg_original_path . '/' . $photo->path; ?>','<?php echo $photo->name; ?>');"> <****image source here, no nned to change******>

Logged
tim0fee
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #7 on: March 26, 2007, 11:15:51 AM »

hi weber,

Thanks for your idea. I would like to use this function also but I'm fairly new to php coding. Sad Could you (or anyone) please show exactly where the code alterations would go and in which files?

Many thanks,

tim0fee
Logged
weber
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #8 on: March 28, 2007, 02:17:25 PM »

ok, no more problem....

in function showCategory($row, $subcats, $photos, $pageNav, $params) part,
claim $eg_original_path

add javascript to heading part, don't know which one, but i add them all
    $mainframe->addCustomHeadTag('<leasygallery/slimbox/css/slimbox.css"
    $mainframe->addCustomHeadTag('<scy/slimbox/js/mootools.js"></script>');
    $mainframe->addCustomHeadTag('<scry/slimbox/js/slimbox.js"></script>');
    $mainframe->addCustomHeadTag('<lallery/style.css" rext/css" />');

the about code is not correct(just part of them), please just copy from other part in the same file, no changes need to made

final, instead of link the photo to image <a href=<php echo $link   locate this part, change to

<a href="javascript:void(0);" onclick="Lightbox.show('<?php echo $mainframe->getCfg('live_site') . $eg_original_path . '/' . $photo->path; ?>','<?php echo $photo->name; ?>');"> <****image source here, no nned to change******>



detail:

extract your zip file before install the component, modify "easygallery.html.php" and repack then install. or you can modify the file then upload the file to the server seperately...it should be located in somewhere like component->easygallery

here is how you make the change:
1) about line 33
looks like this:
    global $option, $eg_original_path, $mainframe, $eg_thumbnail_path, $eg_thumbnail_width, $Itemid, $eg_thumbnail_rows, $eg_thumbnails_per_row, $my;

add "$eg_original_path":
    global $option, $eg_original_path, $eg_original_path, $mainframe, $eg_thumbnail_path, $eg_thumbnail_width, $Itemid, $eg_thumbnail_rows, $eg_thumbnails_per_row, $my;

2) line 35~38, add below, if duplicated, remove the duplicated line.
    $mainframe->addCustomHeadTag('<link href="'. $mainframe->getCfg('live_site') . '/components/com_easygallery/style.css" rel="stylesheet" type="text/css" />');
   
    $mainframe->addCustomHeadTag('<link rel="stylesheet" href="components/com_easygallery/slimbox/css/slimbox.css" type="text/css" media="screen" />');
    $mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_easygallery/slimbox/js/mootools.js"></script>');
    $mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_easygallery/slimbox/js/slimbox.js"></script>');

3) around lin 108 which looks like : <a href="<?php echo $link  ?>

change to
   <a href="javascript:void(0);" onclick="Lightbox.show('<?php echo $mainframe->getCfg('live_site') . $eg_original_path . '/' . $photo->path; ?>','<?php echo $photo->name; ?>');">
 
Logged
tim0fee
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #9 on: March 28, 2007, 08:56:09 PM »

Hey weber,

Thank you very much for your time! That is perfect. Cheesy

best,

tim0fee
Logged
Dumber
Newbie
*
Offline Offline

Posts: 26


View Profile
« Reply #10 on: March 29, 2007, 04:56:54 PM »

hmmm, i'm not getting it working.
Can anyone post the php file, or something like search for this and replace it with that?
Logged
tim0fee
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #11 on: March 30, 2007, 09:01:35 AM »

ditto the above ...

I have only just had the chance to test and I too am getting a script error Sad

Can you post your complete file please weber?

Thanks,

tim0fee
Logged
daclina
Newbie
*
Offline Offline

Posts: 10


View Profile
« Reply #12 on: March 30, 2007, 11:17:44 AM »

Ok I got it and it works v nicely actually, including the slideshow effect with the prev + next gifs. But I did change a few things from weber's post - thanx 4 his advice tho:

this is how i did it:

1.open easygallery.html.php
2. around line 33: replace

global $option, $eg_original_path, $mainframe, $eg_thumbnail_path, $eg_thumbnail_width, $Itemid, $eg_thumbnail_rows, $eg_thumbnails_per_row, $my;

with

global $option, $eg_original_path, $eg_original_path, $mainframe, $eg_thumbnail_path, $eg_thumbnail_width, $Itemid, $eg_thumbnail_rows, $eg_thumbnails_per_row, $my;

3.around line 34: find

$mainframe->addCustomHeadTag('<link href="'. $mainframe->getCfg('live_site') . '/components/com_easygallery/style.css" rel="stylesheet" type="text/css" />');

add

$mainframe->addCustomHeadTag('<link rel="stylesheet" href="components/com_easygallery/slimbox/css/slimbox.css" type="text/css" media="screen" />');
$mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_easygallery/slimbox/js/mootools.js"></script>');
$mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_easygallery/slimbox/js/slimbox.js"></script>');

4.line 108:replace

<a href="<?php echo $link  ?>

with

<a href="<?php echo $mainframe->getCfg('live_site') . $eg_original_path . '/' . $photo->path; ?>" rel="lightbox[<?php echo EG_CATEGORY_DESCRIPTION; ?>]">

Thats it. Enjoy
« Last Edit: March 30, 2007, 12:00:40 PM by daclina » Logged
tim0fee
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #13 on: March 30, 2007, 12:35:53 PM »

daclina,

Thanks so much! That works like a charm! Cheesy and thanks to weber for the original idea!

Yay!

tim0fee
Logged
daclina
Newbie
*
Offline Offline

Posts: 10


View Profile
« Reply #14 on: April 02, 2007, 10:37:43 AM »

Hi again,

I just thought of something - anybody have any ideas on how to add a png watermark to the slimbox images? I have seen some examples online of how to add a png watermark using gd2 - but don't have any experience with this so any suggestions would be appreciated.
« Last Edit: April 02, 2007, 10:44:26 AM by daclina » Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Joomla-addons.org © 2006 | www.bandhosting.nl | JCD-A Member | Newsletter | Sitemap |