You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 157 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - GT for My_eGallery [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
eminem_law
Nuke Soldier
Nuke Soldier


Joined: Jan 07, 2004
Posts: 20


PostPosted: Sun Feb 29, 2004 2:12 am Reply with quoteBack to top

hey, my site is kilaw.tk rite and i got my_eGallery and im looking for a good css stytle or woteva and i got a problem..i cant update mine coz it says sum html is not allowed or something and i need it look here: http://www.need4speed.ashst.com/nuke/modules.php?op=modload&name=My_eGallery&file=index&do=showpic&pid=25&orderby=dateD and look at the white box at the bottom... THATS A COMMENT lol please help me fix it..

thanx in advance
Find all posts by eminem_lawView user's profileSend private message
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 11:02 am Reply with quoteBack to top

I need to get GT-NextGen working for My_eGallery for my new www.canadianhottie.ca site, which uses a pretty modded Gallery, but the URL's for the gallery's and pics are the same.

I am a little different in that I am using IIS and ISAPI_rewrite. But should not make a difference. I have GT working for the rest of my site.

I already have the ISAPI_rewrite rules in place, and created a GoogleTap/GT-Gallery.php file. I am using the new GT-Nextgen 0.4, seems everyone else in this old thread had been using the older versions.

(I have renamed my module as Gallery)

Here is the GT-Gallery.php file I made:
Code:

<?php

$urlin = array(
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=upload'",
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showgall&amp;gid=([0-9]*)&amp;offset=([0-9]*)&amp;orderby=(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)'",
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showgall&amp;gid=([0-9]*)&amp;offset=&amp;orderby=(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)'",
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showgall&amp;gid=([0-9]*)'",
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showpic&amp;gid=([0-9]*)&amp;pid=([0-9]*)&amp;orderby=(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)'",
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showpic&amp;pid=([0-9]*)&amp;orderby=(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)'",
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showpic&amp;pid=([0-9]*)'",
"'(?<!/)modules.php\?name=Gallery'",
"'(?<!/)modules.php\?name=Gallery_Info'"
);

$urlout = array(
"babes-upload.html",
"babes-cat-\\1-\\2_\\3.html",
"babes-cat-\\1_\\2.html",
"babes-cat-\\1.html",
"babes-\\1-\\2_\\3.html",
"babes-\\1_\\2.html",
"babes-\\1.html",
"gallery.html",
"whatsnew.html"
);

?>



And here is the lines I added to httpd.ini (IIS rewrite)
Code:

#Gallery
RewriteRule /babes-upload\.html /modules.php\?name=Gallery&file=index&do=upload
RewriteRule /babes-cat-([0-9]*)-([0-9]*)_(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)\.html /modules.php\?name=Gallery&file=index&do=showgall&gid=$1&offset=$2&orderby=$3
RewriteRule /babes-cat-([0-9]*)_(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)\.html /modules.php\?name=Gallery&do=showgall&gid=$1&offset=&orderby=$2
RewriteRule /babes-cat-([0-9]*)\.html /modules.php\?name=Gallery&file=index&do=showgall&gid=$1
RewriteRule /babes-([0-9]*)-([0-9]*)_(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)\.html /modules.php\?name=Gallery&file=index&do=showpic&gid=$1&pid=$2&orderby=$3
RewriteRule /babes-([0-9]*)_(titleA|titleD|dateA|dateD|ratingA|ratingD|hitsA|hitsD)\.html /modules.php\?name=Gallery&file=index&do=showpic&pid=$1&orderby=$2
RewriteRule /babes-([0-9]*)\.html /modules.php\?name=Gallery&file=index&do=showpic&pid=$1
RewriteRule /gallery\.html /modules.php\?name=Gallery
RewriteRule /whatsnew\.html /modules.php\?name=Gallery_Info



If I manualy type in a URL, like http://www.canadianhottie.ca/babes-8102.html
it works fine! but on the http://www.canadianhottie.ca/gallery.html pages the url's are not getting rewritten for the links to gallery's and pics.

I think it may have something to do with the "&do=" ?? Looking at the other GT-Modulename.php files I don't seem to see any that have this?

Has anyone actualy got GT working for My_eGallery?
Find all posts by canadakaView user's profileSend private messageVisit poster's website
hamesh
Support Mod
Support Mod


Joined: Feb 13, 2003
Posts: 170

Location: Canada

PostPosted: Wed Mar 01, 2006 12:33 pm Reply with quoteBack to top

I can't believe I'm still on this list Wink Oh, really nice site by the way!

Well haven't used PHP-Nuke or My_eGallery for a few years now. First, my advise is to abandon My_eGallery altogether. Go get Menalto Gallery or Coppermine, either of which can plug into Nuke and are actively developed. If you use My_eGallery, it's just a matter of time until you get hacked, trust me on this.

But if you absolutely must use My_eGallery (shudder), the problem is with the amphersans in the URLs. If you look at the URLs in the HTML source of your pages, you'll see that the Gallery URLs can contain a mix of '&' and '&amp;'. for example, here's the URL to a link to one of the images on your homepage:

Code:
modules.php?name=Gallery&file=index&amp;do=showgall&amp;gid=152

and here's the line in your GT-Gallery.php:
Code:
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showgall&amp;gid=([0-9]*)'",

Notice the mis-matched amphersans between Gallery and file? So either edit the lines in your GT-Gallery.php file so the amphersans match up in the URLs. Or do what I did and edit the PHP source of the My_eGallery modules files and update all the URLs in the code so they all use one convention or the other, but not both.

_________________
Image
Find all posts by hameshView user's profileSend private messageSend e-mailVisit poster's websiteMSN MessengerICQ Number
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 12:54 pm Reply with quoteBack to top

thanks for the reply and your comments on my site. Its a new site that's a spawn from www.canadaka.net which as been running nuke since 2000.

I want to stay with My_eGallery, I like it. I use coppermine on some other sites its good too. But my main reason to stay with it is I have over 5000 pictures and 20,000 comments in it already, I don't want to lose it all.

I have been hacked through My_eGallery, but leart from these hacks and have secured the gallery, im sure not 100% nothing is, but much better than out of the box.

Thanks for your tip woth the &amp;
makes sense. I will scan through the my_egallery code and change all the & to &amp;. It should be that way anyway!
Find all posts by canadakaView user's profileSend private messageVisit poster's website
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 1:09 pm Reply with quoteBack to top

no luck Sad

I went through all the files in the gallery folder and looked for lone &, found a few but almost everything was using &amp; already.

So it must be something else...
Find all posts by canadakaView user's profileSend private messageVisit poster's website
hamesh
Support Mod
Support Mod


Joined: Feb 13, 2003
Posts: 170

Location: Canada

PostPosted: Wed Mar 01, 2006 1:14 pm Reply with quoteBack to top

Easy enought to test. Edit this new line in GT-Gallery.php:

Code:
"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=showgall&amp;gid=([0-9]*)'",


replace with:

Code:
"'(?<!/)modules.php\?name=Gallery&file=index&amp;do=showgall&amp;gid=([0-9]*)'",


Then clear your browser's cache and reload your homepage. Test the thumbnail links.

_________________
Image
Find all posts by hameshView user's profileSend private messageSend e-mailVisit poster's websiteMSN MessengerICQ Number
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 1:56 pm Reply with quoteBack to top

no change

I thought I wanted to get rid of all the lone "&" ?

The thumnails on the front-page (news) I have hard coded to use the rewritten url's.

http://www.canadianhottie.ca/gallery.html

Is where the problems are.

Like the "Submit Media" link in the top right. its a very simple rule, no id's or anything, its not getting rewritten.

exert from GT-Gallery.php
Code:

"'(?<!/)modules.php\?name=Gallery&amp;file=index&amp;do=upload'",

"babes-upload.html",


exert from httpd.ini
Code:

RewriteRule /babes-upload\.html /modules.php\?name=Gallery&file=index&do=upload
Find all posts by canadakaView user's profileSend private messageVisit poster's website
hamesh
Support Mod
Support Mod


Joined: Feb 13, 2003
Posts: 170

Location: Canada

PostPosted: Wed Mar 01, 2006 2:10 pm Reply with quoteBack to top

Ah, you're right. The rule and the line in GT-Gallery.php match the URL so no reason it shouldn't work. Are you GT'ing any other section of your site? And do those work correctly?

Almost seems as though the GT-Gallery.php is not being called or included, so the rewrite rule works, but there's no matching URL array so it just redirects the rewritten URL to the standard one.

_________________
Image
Find all posts by hameshView user's profileSend private messageSend e-mailVisit poster's websiteMSN MessengerICQ Number
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 2:20 pm Reply with quoteBack to top

Yes GT is indeed working for the rest of the site. example check the forums

http://www.canadianhottie.ca/forums.html

I also edited the forum rules to include my mods like the medals, stats, and stuff.

There shouldn't be any code i need to add to the Gallery module.. there isn't for the others. just the code inserted to the sites header.php, footer.php and sessions.php

So the rewrite rules sem to work, since i can maualy type in a gallery url and it will work ( http://www.canadianhottie.ca/babes-cat-151.html )

So it must be a problem with the GT-Gallery.php ? How could i test if its being included?

Well i added some junk that would break the code:
Code:

urlin = array(dsfsdfdsf

and the Gallery pages continue to load properly... so that must mean its not being included right? I did the same to the GT-Forums.php and the forums were broken, blank page.
Find all posts by canadakaView user's profileSend private messageVisit poster's website
hamesh
Support Mod
Support Mod


Joined: Feb 13, 2003
Posts: 170

Location: Canada

PostPosted: Wed Mar 01, 2006 2:28 pm Reply with quoteBack to top

Yeah I'd look at it from that angle. May not being included at all. Unfortunately I can't be of much further help as don't use Nuke or Meg so can't test anything on my end. Hopefully someone else will jump in, but I think you're on the right track...

_________________
Image
Find all posts by hameshView user's profileSend private messageSend e-mailVisit poster's websiteMSN MessengerICQ Number
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 2:41 pm Reply with quoteBack to top

hey well thanks for the help so far.

heh this is driving me nuts!

in header.php there is this code:
Code:

$nextgen_path = "GoogleTap/GT-".$nextgen_name.".php";
if ($next_gen_ob == 1) {
   if (file_exists($nextgen_path)) {
   ob_start();
   } else {
   $next_gen_ob = 0;
   }
}


to test i changed "GT-".$nextgen_name.".php" to "GT-Gallery.php" which will stop GT from working for the rest of the site, but should make sure that the GT-Gallery is being included? Well made no difference.


Now i did find one thing in "admin/modules/gallery/config.php
there is this line:
Code:

$baseurl= "modules.php?name=Gallery&file=index";

which I changed to
Code:

$baseurl= "modules.php?name=Gallery&amp;file=index";


now when you view the page source the "Gallery&amp;file=" is correct, before it was indeed outputting "Gallery&file=".

But alas GT still not working in galery. I will post any updates.
Find all posts by canadakaView user's profileSend private messageVisit poster's website
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 2:45 pm Reply with quoteBack to top

doing some trouble shooting.. ot the header.php i added the echos

Quote:

//Make the path to the GT-NExtGEn Files
$nextgen_path = "GoogleTap/GT-".$nextgen_name.".php";
if ($next_gen_ob == 1) {
if (file_exists($nextgen_path)) {
echo "TRUE";
ob_start();
} else {
echo "FALSE";
$next_gen_ob = 0;
}
}

function replace_for_mod_rewrite(&$s, $nextgen_path) {

//Check to see if file exists before continuing
if (file_exists($nextgen_path)) {
include($nextgen_path);
echo " TRUE 2";
}
$s = preg_replace($urlin, $urlout, $s);
return $s;
} #End of Google Tap Header


on the http://www.canadianhottie.ca/forums.html in the top right you will see "TRUE TRUE 2" echod. So its working fine.

on the http://www.canadianhottie.ca/gallery.html you only see 'TRUE"
so indeed its not getting into the replace_for_mod_rewrite function which actualy includes the GT-GALLERY.php.

The replace_for_mod_rewrite is alled in the footer.php

Quote:

echo "next_gen_ob: ". $next_gen_ob;
#Start of GoogleTap Footer
if ($next_gen_ob == 1) {
// Store Buffer in $contents
$contents = ob_get_contents();
//Replace all standalone &'s with &amp's
$contents = preg_replace("(&(?!([a-zA-Z]{2,6}|[0-9\#]{1,6})[\;]))", "&amp;", $contents);
//Fix up for && in script and bad coding of middot;'s, and ;'s
$contents = str_replace(array("&amp;&amp;", "&amp;middot", "&amp;nbsp"), array("&&", "·", " ;"), $contents);
//delete output buffer and stop buffering
ob_end_clean();
//display modified buffer to screen
echo replace_for_mod_rewrite($contents, $nextgen_path);
} else {
//if module has unusual method of including footer, make NExtGEn variables
//global and try it again. If variables have values for NExtGEn it will succeed
//else it will go to normal footer.
global $next_gen_ob, $nextgen_path;
if ($next_gen_ob == 1 AND $nextgen_path != "") {
$contents = ob_get_contents();
$contents = preg_replace("(&(?!([a-zA-Z]{2,6}|[0-9\#]{1,6})[\;]))", "&amp;", $contents);
$contents = str_replace(array("&amp;&amp;", "&amp;middot", "&amp;nbsp"), array("&&", "·", " ;"), $contents);
ob_end_clean();
echo replace_for_mod_rewrite($contents, $nextgen_path);
}
}
#End of GoogleTap Footer


In the footer I added the "echo "next_gen_ob: ". $next_gen_ob;"

on a module that GT is working on it will echo out "next_gen_ob: 1" at the bottom. On the gallery pages it is blank "next_gen_ob: ".
So the problem lies there somewhere.
Find all posts by canadakaView user's profileSend private messageVisit poster's website
canadaka
Corporal
Corporal


Joined: Aug 05, 2004
Posts: 71

Location: Vancouver, Canada

PostPosted: Wed Mar 01, 2006 3:54 pm Reply with quoteBack to top

lol

well at least i have a good record now. maybe someone else will have a simular problem and find this all useful.

The problm is that the $next_gen_ob and $nextgen_path are not getting passed to the footer.php with the My_eGallery module... im not sure I tried a bunch of things to try and get it too.

I give up with that, BUT i have found a workaround! I got GT working in my Gallery now!!!!

What I did is in the root of the Gallery module folder edited the index.php

The function called: function galleryFooter() {

I added this before include("footer.php");

$next_gen_ob = 1;
$nextgen_path = "GoogleTap/GT-Gallery.php";


So it looks like:
Quote:

function galleryFooter() {
global $font;
print '<p align="right">'
.'<font class="'.$font['tiny'].'">'
.sprintf(_GALCOPYRIGHT, _GALVERSION)
.'</font>'
.'</p>'
;
$next_gen_ob = 1;
$nextgen_path = "GoogleTap/GT-Gallery.php";

include("footer.php");
}


Now my gallery is working with GT like a charm!
Find all posts by canadakaView user's profileSend private messageVisit poster's website
hamesh
Support Mod
Support Mod


Joined: Feb 13, 2003
Posts: 170

Location: Canada

PostPosted: Wed Mar 01, 2006 7:28 pm Reply with quoteBack to top

w00t! Excellent. And good tip for the next guy. Cheers mate. Canada rox Smile

_________________
Image
Find all posts by hameshView user's profileSend private messageSend e-mailVisit poster's websiteMSN MessengerICQ Number
spike84
Nuke Soldier
Nuke Soldier


Joined: Sep 17, 2005
Posts: 10


PostPosted: Mon Mar 06, 2006 6:30 am Reply with quoteBack to top

that's not working for me Crying or Very sad
it's working only the "gallery.html" url Crying or Very sad Crying or Very sad
Find all posts by spike84View user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.650 Seconds - 137 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::