11
Will_H
Re: Extending the reach of lightbox.
  • 2006/12/23 18:03

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Is there something wrong with this?

// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1" rel="lightbox">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1" alt="" />';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\3" rel="lightbox" title="\2" alt="\2">/modules/extgallery/hook-thumb.php?id=\3" alt="\2" title="\2" />';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '
<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="" />a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"
]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\2]" title="\4" alt="\4">/modules/extgallery/hook-thumb.php?id=\5" title="\4" alt="\4" />';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\4]" title="\2" alt="\2">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\2" alt="\2" />';
// End eXtGallery Hack


I mean, it looks right to me, and its functional everywhere but the forums. The forums dont have there own xoopscode doc do they? I am back to cbb. The format doesnt seem to be any different than that of the [img] or [quote ] or any other tag.

Could the "rel=lightbox" be throwing it for a loop? If so, why? The theme has the path to lightbox embedded in the header....

i.e.

<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
<
link rel="stylesheet" href="<{$xoops_url}>/include/lightbox.css" type="text/css" media="screen" />
        <
script type="text/javascript" src="<{$xoops_url}>/include/prototype.js">script>
        <
script type="text/javascript" src="<{$xoops_url}>/include/scriptaculous.js?load=effects">script>
        <
script type="text/javascript" src="<{$xoops_url}>/include/lightbox.php?dirname=<{$xoops_dirname}>">script>

12
kris_fr
Re: Extending the reach of lightbox.
  • 2006/12/23 23:46

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


Thickbox script into XOOPS web site here + modules extgallery and rmsoft myfolder
PNG transparence under ie for totality web site

A +

13
Will_H
Re: Extending the reach of lightbox.
  • 2006/12/24 3:00

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


yeah that trans is nice. However does it work through your forums?

14
Feichtl
Re: Extending the reach of lightbox.
  • 2006/12/26 9:31

  • Feichtl

  • Not too shy to talk

  • Posts: 126

  • Since: 2004/11/8


I'm also a fan of the lightbox effect and use it to display a huge image of a webcam. As i hope that a lot of people are visiting this website because of watching images from the webcam, i want to place Xoops-Banners below the image.

Unfortunately i'm not a coder, so i'm unable to put the right code into the right place. Could someone give me a little assistance, please?

THX,

Werner.

15
Will_H
Re: Extending the reach of lightbox.
  • 2007/12/19 0:36

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Just figured I would update this.

The reason that cbb, and other modules that depend on Frameworks, did not recognize the [gallery] codes was that it uses an independent version of module.textsanitizer.php

Located in Frameworks/textsanitizer/module.textsanitizer.php

To get all Frameworks modules to function with the extgallery hook hack.

Locate: (Around Line 126)
$this->text $text;
        
$this->patterns $patterns;
        
$this->replacements $replacements;


Before Add
// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1" rel="lightbox">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1" alt="" />';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\3" rel="lightbox" title="\2" alt="\2">/modules/extgallery/hook-thumb.php?id=\3" alt="\2" title="\2" />';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '
<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="" />a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"
]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\2]" title="\4" alt="\4">/modules/extgallery/hook-thumb.php?id=\5" title="\4" alt="\4" />';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\4]" title="\2" alt="\2">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\2" alt="\2" />';
// End eXtGallery Hack


Boom, now all modules that require Frameworks will be able to use the [gallery] tag.

Please remember that this is a hack. When you update your frameworks, you will have to redo it.

16
Will_H
Re: Extending the reach of lightbox.
  • 2007/12/19 0:52

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Quote:

I'm also a fan of the lightbox effect and use it to display a huge image of a webcam. As i hope that a lot of people are visiting this website because of watching images from the webcam, i want to place Xoops-Banners below the image.

Unfortunately i'm not a coder, so i'm unable to put the right code into the right place. Could someone give me a little assistance, please?

THX,

Werner.


Open
modules/extgallery/templates/extgalery_public-album.html

Find:
<{if $photos[photo].photo_serveur && $photos[photo].photo_name}>
                <
a href="public-photo.php?photoId=<{$photos[photo].photo_id}>#photoNav"><img class="thumb" src="<{$photos[photo].photo_serveur}>thumb_<{$photos[photo].photo_name}>" alt="<{$photos[photo].photo_desc}>" title="<{$photos[photo].photo_desc}>" />a>
                <{elseif 
$photos[photo].photo_name}>
                <
a href="public-photo.php?photoId=<{$photos[photo].photo_id}>#photoNav" rel="lightbox"><img class="thumb" src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$photos[photo].photo_name}>" alt="<{$photos[photo].photo_desc}>" title="<{$photos[photo].photo_desc}>" />a>
                <{/if}>


Replace with


<
a href="<{$xoops_url}>/uploads/extgallery/public-photo/medium/<{$photos[photo].photo_name}>" rel="lightbox[<{$cat.cat_name}>]" title="<{$photos[photo].photo_desc}>{$photos[photo].photo_id}>'>More info & CommentsYOUR BANNER CODE HERE">
   <
img class="thumb" src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$photos[photo].photo_name}>" alt="<{$photos[photo].photo_desc}>" title="<{$photos[photo].photo_desc}>" />
a>


Look for "YOUR BANNER CODE HERE" and replace that with your banner code.

Late but still answered.

17
Will_H
Re: Extending the reach of lightbox.
  • 2007/12/19 4:50

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Thanks for the clone, but that still wont work in cbb and frameworks dependent modules without the hack. If it does I'd sure love to know how you managed to hook the modules without hacking frameworks.

18
iHackCode
Re: Extending the reach of lightbox.

try this on Frameworks 1.2x http://bandit-x.net/bandit-x/gallery_FW12x.zip (a Gallery bbcode plugin file for Frameworks 1.2x .\Frameworks\textsanitizer\plugins.)
dont forget to enable the plugin.

= enabling the plugin =
modify Frameworks\textsanitizer (config.php) and (module.textsanitizer.php) to load the gallery file.


* i dont have extgallery installed so i dont know if it works right.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

19
Will_H
Re: Extending the reach of lightbox.
  • 2007/12/24 14:28

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


Not sure, but if it does then there are two ways to do it. Best part about yours is that it is less likely to get overwritten in a Frameworks update.

I will check it out after the holiday. Not home to do so atm.

20
Feichtl
Re: Extending the reach of lightbox.
  • 2008/1/15 18:09

  • Feichtl

  • Not too shy to talk

  • Posts: 126

  • Since: 2004/11/8


Quote:

Will_H wrote:
... Look for "YOUR BANNER CODE HERE" and replace that with your banner code.

Late but still answered.


THX for this suggestion, but in the meantime i use myalbum-p. Your hack works - similiar - for the template myalbum_photo.html. Xoops-banner <{$xoops_banner}> is shown below the picture.

BUT: Lightbox effect only shows up, if you click the photo - and that's the place, where i want to show the banner! IMO "lightbox.js" has to be hacked to show the banner. Right?

Late, but took some time to think about

THX,

Werner.

Login

Who's Online

319 user(s) are online (271 user(s) are browsing Support Forums)


Members: 0


Guests: 319


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits