Topic Title: GT-NExtGEn and Gallery

Forum Index » GalleryTap » GT-NExtGEn and Gallery
Topic URL: http://www.nukedgallery.net/postt463.html

AuthorMessage
Post Title: GT-NExtGEn and Gallery
Aylwin
Joined: Sep 16, 2003
Posts: 27

Posted: Sun Nov 30, 2003 12:49 pm
For those who don't know yet, there's now an improved version of Gallery Tap which is much easier to install and maintain. It's GT-NExtGEn [audioslaved.com]. You can check out the thread at NukeCops [nukecops.com]. I only discovered this recently myself. It's currently Beta 0.4 but it works just fine.

You still need to edit your .htaccess, header.php and footer.php files but now each module has it's own GT-<module name>.php file under a GoogleTap directory.

Once you have GT-NExtGEn installed and working you'll need to edit your .htaccess file as described in the Gallery Tap instructions here at NukedGallery. You then need to create a GT-gallery.php file. Again, the contents are basically the same as described in the Gallery Tap instructions. Here's the file:

Code: › <?php

$urlin = array(
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&amp;id=([a-zA-Z0-9_-]*)&amp;op=modload&amp;name=gallery&amp;file=index&amp;include=view_photo.php'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&amp;op=modload&amp;name=gallery&amp;file=index&amp;include=view_album.php&amp;page=([0-9]*)'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&amp;op=modload&amp;name=gallery&amp;file=index&amp;include=view_album.php'",
"'(?<!/)modules.php\?op=modload&amp;name=gallery&amp;file=index&amp;include=albums.php&amp;set_albumListPage=([0-9]*)'",
"'(?<!/)modules.php\?op=modload&amp;name=gallery&amp;file=index&amp;include=albums.php'",
"'(?<!/)modules.php\?name=gallery'"
);

$urlout = array(
"gallery-photo_\\1-\\2.html",
"gallery-album_\\1-page\\2.html",
"gallery-album_\\1.html",
"gallery-page\\1.html",
"gallery.html",
"gallery.html"
);

?>


There's also a small tweak needed to /modules/gallery/html_wrap/wrapper.header.default. Find:

Code: › global $PHP_SELF;


and replace with:

Code: › global $PHP_SELF, $nextgen_path, $next_gen_ob;


If you use the random photo block (my favorite), here's a mod for Google Tap support. Open /modules/gallery/random_support.php and find:

Code: ›     function random_photo($album, $index,$filetype){
   global $gallery;
      if (isset($index)) {
         $id = $album->getPhotoId($index);
         $url = SERVER_ADDR;
         $url .= "modules.php?set_albumName=".$album->fields["name"];
         $url .= "&id=" .$id;
         $url .= "&op=modload&name=gallery&file=index&include=view_photo.php";

         $albumURL = SERVER_ADDR;
         $albumURL .= "modules.php?set_albumName=".$album->fields["name"];
         $albumURL .= "&op=modload&name=gallery&file=index&include=view_album.php";
         $content = "<center><a href=\"$url\">".$album->getThumbnailTag($index)."</a></center>";
         $caption = $album->getCaption($index);
         if ($caption) {
            $content.="<br><center>".$caption."</center>";
         }
         $content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

      } else {
         $content = "No photo chosen.";
      }


and replace with:

Code: ›     function random_photo($album, $index,$filetype){
   global $gallery;
      if (isset($index)) {
         $id = $album->getPhotoId($index);
         $url = SERVER_ADDR;
         $url .= "gallery-photo_".$album->fields["name"]."-";
         $url .= $id;
         $url .= ".html";

         $albumURL = SERVER_ADDR;
         $albumURL .= "gallery-album_".$album->fields["name"];
         $albumURL .= ".html";
         $content = "<center><a href=\"$url\">".$album->getThumbnailTag($index)."</a></center>";
         $caption = $album->getCaption($index);
         if ($caption) {
            $content.="<br><center>".$caption."</center>";
         }
         $content .= "<br><center>From: <a href=\"".$albumURL."\">".$album->fields["title"]."</a></center>";

      } else {
         $content = "No photo chosen.";
      }


This mod will also work with Google Tap 0.6.5. However, it's only for the random function. I don't use the hourly and daily photo functions myself so I didn't bothering to figure out the mod for them. Wink

By the way, you can find GT-NExtGEn Beta 0.4 working on my website: http://www.cal-family.org/ [cal-family.org]

I hope you find this info useful. Very Happy

AuthorMessage
Post Title:
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Sun Nov 30, 2003 7:26 pm
out of curiousity, do you notice any decrease in server load with the new googletap?

AuthorMessage
Post Title:
Aylwin
Joined: Sep 16, 2003
Posts: 27

Posted: Sun Nov 30, 2003 9:21 pm
Ummm, how do I check server load? Embarassed

I would assume though that it does decrease the server load. With the old googletap, the header.php file will just get bigger and bigger as you tap more modules. The whole tap is then loaded everytime because we're always loading header.php.

With this new one, header.php remains small and it only loads the tap for the module being viewed. If a tap doesn't exist for a particular module then it just skips the tap routine.

Anyway, this is how I guess it works. At least to me, it seems more efficient. But one thing I don't understand is how the .htaccess file works. It'll just get bigger and bigger. Does the size of the .htaccess file affect server load, processing time, etc.? Rolling Eyes

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
Aylwin
Joined: Sep 16, 2003
Posts: 27

Posted: Sun Dec 07, 2003 3:46 am
For those of you who happen to be using GT-NExtGEn (or even if you're not), I've put together a google tap conversion pack for Gallery 1.4.1:

http://gt.audioslaved.com/downloads-cat3.html

The conversion pack includes modded versions of the blocks found here at NukedGallery for google tap compatibility. I've also modded the multi-random block (found here [nukedgallery.net]) so that you can specify how many rows of photos you want.

I hope you find it useful.

AuthorMessage
Post Title:
Stevesteve
Joined: Sep 09, 2003
Posts: 13

Posted: Thu Dec 11, 2003 7:37 pm
very usefull, works great!

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
nukestud
Joined: Apr 13, 2003
Posts: 13

Posted: Tue Jan 06, 2004 6:36 am
I got pretty much everything working accept the links on the photos are still the nuke style links modules.php?set_albumName=album12&id=etc

Links to the albums like gallery-album_album12.html work fine and gallery.html all work but no matter what I do I can't get the photo links right. I have gallery 1.3.3 in nuke 6.5 and have followed the steps above several times over just to be sure but still no go.

Any suggestions?

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
Aylwin
Joined: Sep 16, 2003
Posts: 27

Posted: Thu Jan 22, 2004 11:02 am
Perhaps the urls for the photos in 1.3.3 are a bit different from 1.4.1? Could post a sample url? Or maybe a link to your photo gallery so we can have a look.

Hopefully, it's just a case of url mismatch because it's easy to fix.

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
nukestud
Joined: Apr 13, 2003
Posts: 13

Posted: Fri Jan 23, 2004 1:24 am
Thanks for the reply Aylwin. All sorted now just reinstalled everything again Wink

Cheers....

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
jib_intelli
Joined: Jun 10, 2004
Posts: 14

Posted: Tue Apr 25, 2006 11:44 pm
Could someone please get GT-Nextgen working with Gallery 2.1? It doesnt seem to work!

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Wed Apr 26, 2006 6:26 am
use the gallery2 embedded rewrite module

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
jib_intelli
Joined: Jun 10, 2004
Posts: 14

Posted: Wed Apr 26, 2006 11:36 pm
Will it work or will it interfere with the GT-Nextgen already running on the site?

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Thu Apr 27, 2006 7:03 am
it should work

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
jib_intelli
Joined: Jun 10, 2004
Posts: 14

Posted: Thu Apr 27, 2006 11:52 pm
Sorry not working. Tried everything. 404 not found error. Sad

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Fri Apr 28, 2006 6:28 am
make sure you put the htaccess code that g2 creates at the top of your phpnuke htaccess file. read the instructions at codex.gallery2.org

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
uberandy
Joined: Apr 29, 2004
Posts: 2

Posted: Tue Aug 15, 2006 11:10 am
can anyone confirm that the g2 rewrite mod works with it embed'd in phpnuke?

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
jib_intelli
Joined: Jun 10, 2004
Posts: 14

Posted: Fri Nov 24, 2006 5:14 am
As far as I have managed to figure out, this doesnt work with Gallery 2.1.2 Sad I am waiting for the final release of 2.3 That might fix this issue.

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Mon Dec 04, 2006 8:20 am
no, gt-nextgen works only for gallery 1.x.
gallery2 has a rewrite module available as part of the package, you can try using that instead.

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
jib_intelli
Joined: Jun 10, 2004
Posts: 14

Posted: Mon Apr 23, 2007 10:27 pm
I tried using it Dari, but the problem lies that though the rewrite works okay, it breaks the site theme when integrated in PHPNuke.

AuthorMessage
Post Title: Re: GT-NExtGEn and Gallery
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Tue Apr 24, 2007 6:26 am
yes, it's known that the embedded rewrite can be difficult, if not impossible to get working.

All times are GMT - 5 Hours
Powered by PHPNuke and phpBB2 © 2006 phpBB Group