Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> GT - Next Gen and Standard
Author Message
grantb
Regular
Regular


Joined: Feb 16, 2005
Posts: 67
Location: Canada

PostPosted: Sun Jul 10, 2005 6:39 pm Reply with quote

Hello all! Having a rough time with tapping these modules, here is what I have, hopefully some one can help me with this;

GT-CPanel_User_Guide.php
Code:
<?php 

$urlin = array(
"'(?<!/)modules.php\?name=CPanel_User_Guide&amp;page=([a-zA-Z]*).htm'",
"'(?<!/)modules.php\?name=CPanel_User_Guide'"
);

$urlout = array(
"CPanel_User_Guide-\\1.html",
"CPanel_User_Guide.html"
);


?>

for .htaccess

IGNORE THE SECOND HALF OF THE RULE LINE IT'S NOT POSTING CORRECTLY
Quote:
RewriteRule ^CPanel_User_Guide-([a-zA-Z]*).html cpaneluserguide.html?page=$1 [L]
RewriteRule ^CPanel_User_Guide.html cpaneluserguide.html [L]


Ok for some reason the quote and code for this post is changing the code, bizzar.. "RewriteRule ^CPanel_User_Guide-([a-zA-Z]*).html cpaneluserguide.html?page=$1 [L]
RewriteRule ^CPanel_User_Guide.html cpaneluserguide.html [L]"
Grrr let me try this seperate;
Code:
RewriteRule ^CPanel_User_Guide-([a-zA-Z]*).html 
Code:
cpaneluserguide.html?page=$1 [L] 
Code:


RewriteRule ^CPanel_User_Guide.html
Code:
cpaneluserguide.html [L]


Allright this is not working -- in the rewrite rules it is modules.php ?name= CPanel_User_Guide <--(without spaces) this is the only way I can post it??

It makes good url's like
Quote:
/CPanel_User_Guide-loggingOn.html

But the new links that are generated all redirect to the index.php for the module. Any suggestions would be much appreciated! I have been thinking that this could be somthing to do with the way that the index.php is set up, specifically the accept file entries, eg;
Quote:
$ACCEPT_FILE['loggingOn.htm'] = 'loggingOn.htm';

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Sun Jul 10, 2005 7:20 pm Reply with quote

This is how I wrote mine. I use in .htaccess
Code:
RewriteRule ^cpaneluserguide-([[:alnum:]]*).html modules.php?name=CPanel_User_Guide&page=$1\.htm [L]

RewriteRule ^cpaneluserguide.html modules.php?name=CPanel_User_Guide [L]


And in header.php
Code:
urlin

"'(?<!/)modules.php\?name=CPanel_User_Guide&amp;page=([[:alnum:]]*)\.htm'",
"'(?<!/)modules.php\?name=CPanel_User_Guide'",

urlout
"cpaneluserguide-\\1.html",
"cpaneluserguide.html",


Last edited by Raven on Sun Jul 10, 2005 9:42 pm; edited 1 time in total 
View user's profile Send private message
grantb
PostPosted: Sun Jul 10, 2005 7:36 pm Reply with quote

thank you! worked great, after figuring out that the code you posted changed Smile

Now for the HowTo I tried to do it the same way basically:

Code:
RewriteRule ^PHP-Nuke_HOWTO-([[:alnum:]]*).html modules.php?name=PHP-Nuke_HOWTO&page=$1\.html [L]

RewriteRule ^PHP-Nuke_HOWTO.html modules.php?name=PHP-Nuke_HOWTO [L]

urlin
"'(?<!/)modules.php?name=PHP-Nuke_HOWTO&amp;page=([[:alnum:]]*)\.html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"

urlout
"PHP-Nuke_HOWTO-\\1.html",
"PHP-Nuke_HOWTO.html"
Some pages work
Quote:
PHP-Nuke_HOWTO-terms.html
and others not
Quote:
PHP-Nuke_HOWTO.html?page=formats.html
What am I doing wrong? Sad


Last edited by grantb on Sun Jul 10, 2005 9:55 pm; edited 1 time in total 
Raven
PostPosted: Sun Jul 10, 2005 9:51 pm Reply with quote

The reason for the posted code changing is GT itself. It has no way of knowing not to change the code in the posts.
 
grantb
PostPosted: Sun Jul 10, 2005 9:57 pm Reply with quote

I guess I was editing the post while you were posting... That makes sense
 
grantb
PostPosted: Wed Jul 13, 2005 4:02 am Reply with quote

Weird because I tested this exact post on my forums and it doesn't change any of the code??.. but I really have been trying to get this freakin phpnukehowto going and i have come to a road block..I can tap most of the main heading urls but the sub headings cannot.. any help as to the code to tap this great module would bve so appreciated!!.. if anyone wants I can post what I have so far.
 
Raven
PostPosted: Wed Jul 13, 2005 4:12 am Reply with quote

Please post an example of the subheading that you need tapped. Be sure to post the fully untapped url.
 
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1159
Location: Sanbornton, NH USA

PostPosted: Wed Jul 13, 2005 5:48 am Reply with quote

What's weird here is that if you we are in fact using GT-NextGen (Versus some other kind of GoogleTap), your code should look substantially different from what you are using. As the title of this thread identified GT-NextGen Specifically, I wanted to jump in and update the information. In other versions of GoogleTap, I'm not sure as I don't run them, but In GT-NextGen, the latest example should be different in that:

Code:
"'(?<!/)modules.php?name=PHP-Nuke_HOWTO&amp;page=([[:alnum:]]*)\.html'",



should really be:
Code:
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*)'",


With the accompanying .htaccess code of:
Code:
RewriteRule ^PHP-Nuke_HOWTO-([a-zA-Z0-9_-]*).html modules.php?name=PHP-Nuke_HOWTO&page=$1 [L] 


So all together (plus any functions you are missing), it would look like this:

.htaccess
Code:
RewriteRule ^PHP-Nuke_HOWTO-([a-zA-Z0-9_-]*).html modules.php?name=PHP-Nuke_HOWTO&page=$1 [L]

RewriteRule ^PHP-Nuke_HOWTO.html modules.php?name=PHP-Nuke_HOWTO [L]


GoogleTap/GT-PHP-Nuke_HOWTO.php
Code:
<?php


$urlin = array(
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*)'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"
);

$urlout = array(
"PHP-Nuke_HOWTO-\\1.html",
"PHP-Nuke_HOWTO.html"
);

?>


Finally, one thing you might want to consider is making your outlinks easier and all lower case.

For example to get the output to be something like: nuke-howto.html
or for your other docs: cpanel-docs.html

This makes the name easy to identify for reference as well as for search engines, which is actually the point of this excersize.

In that example, you'd merely change the first part of your .htaccess rules (up to the .html part) and the urlout part to match, like:
Code:


$urlout = array(
"nuke-howto-\\1.html",
"nuke-howto.html"
);


and:
Code:
RewriteRule ^nuke-howto-([a-zA-Z0-9_-]*).html modules.php?name=PHP-Nuke_HOWTO&page=$1 [L]

RewriteRule ^nuke-howto.html modules.php?name=PHP-Nuke_HOWTO [L]


Please keep in mind, Raven uses a different version of GoogleTap, (non GT-NextGen) so his code is slighly different in nature and structure.

Hope this helps!
Steph

_________________
Steph Benoit Only registered users can see links on this board! Get registered or login!
1CMS, 100% Section 508 and W3C XHTML/CSS Compliant (Truly) 
View user's profile Send private message Visit poster's website
Raven
PostPosted: Wed Jul 13, 2005 7:58 am Reply with quote

Thanks Steph. For a little clarification though and for future reference, the forum's name is GT - Next Gen and Standard to cover more than just Next Gen. And I couldn't tell from his original post which one he meant but from his code it looks like the same version I use, which was Bill's original incarnation, to my understanding.
 
64bitguy
PostPosted: Wed Jul 13, 2005 9:50 pm Reply with quote

Ah! Thanks for the heads up Raven. I wondered what your was called (after all these years)... I thought maybe yours was the old NukeCops version, but I never knew for sure.

Are there some docs somewhere about the Standard Version so I can hone up?

Thanks
Steph
 
Raven
PostPosted: Wed Jul 13, 2005 10:47 pm Reply with quote

I never understood where the 2 crossed paths. It seems that Paul may have started it and Bill ran with it. And then again, I could be making all this up to confuse you because you never offer any scripts for free ROTFL I couldn't resist it - That's really a kicker boxingself
 
grantb
PostPosted: Thu Jul 14, 2005 1:31 am Reply with quote

Thanks guys for helping with this!.. Allright somethig isn't right here.. when I use the code that 64bitguy posted I get double .html extensions, for eg: phpnuke-manual-history.html.html (the name of the php-nuke_HOWTO I am using is phpnuke-manual) and when I change the GT-PHP-Nuke_HOWTO.php to include the .html it gives good urls but just goes back to the main page no matter what the url is, eg: phpnuke-manual-history.html <-- looks good but just returns to the main manual page. So here is what I have: For .htaccess
Code:
RewriteRule ^phpnuke-manual-([a-zA-Z0-9_-]*).html modules.php?name=PHP-Nuke_HOWTO&page=$1 [L]

RewriteRule ^phpnuke-manual.html modules.php?name=PHP-Nuke_HOWTO [L]
and for GT-PHP-Nuke_HOWTO.php:
Code:
$urlin = array(

"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*).html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"
);

$urlout = array(
"phpnuke-manual-\\1.html",
"phpnuke-manual.html"
);

That keeps the double .html extension away but the url's don't seem to do anything? Why do I have so much trouble with this googletap concept?..lol When I use the code
Code:
$urlin = array(

"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([[:alnum:]]*)\.html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"
);

$urlout = array(
"phpnuke-manual-\\1.html",
"phpnuke-manual.html"
);
and coresponding entries in .htaccess:
Code:
RewriteRule ^phpnuke-manual-([[:alnum:]]*).html modules.php?name=PHP-Nuke_HOWTO&page=$1 [L]

RewriteRule ^phpnuke-manual.html modules.php?name=PHP-Nuke_HOWTO [L]
I get some urls as phpnuke-manual-introduction.html and some urls as phpnuke-manual.html?page=whatis-phpnuke.html (seems random) WIth the same result, takes me to the main page only. I have no idea why the generated urls are not converting back properly. A regular url looks like modules.php?name=PHP-Nuke_HOWTO&page=introduction.html By the way, Raven, after implementing the code for the cpanel guide I had about 150 bots crawling on that guide. Thanks! Smile ps. Using GT-NextGen
 
Raven
PostPosted: Thu Jul 14, 2005 7:38 am Reply with quote

Ah, the fun of debugging Wink. Just for grins, try this
Code:
$urlin = array(

"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([[:alnum:]]*)\.html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&page=([[:alnum:]]*)\.html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"
);

$urlout = array(
"phpnuke-manual-\\1.html",
"phpnuke-manual-\\1.html",
"phpnuke-manual.html"
);
 
grantb
PostPosted: Thu Jul 14, 2005 9:36 am Reply with quote

I tried that to and same thing, some urls look good and some are still phpnuke-manual.html?page=availability-of-sources.html but neither does anything besides go back to the main page. Using the "'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*).html'" makes all the url's look right, but not functional (main page thing) it seems to me that the problem is not the url rewrite but the rewrite back when clicked? Does that make any sense?... Confused Something to do witht he page name allready having the .html and when it is clicked does not convert back to the proper page name.
 
grantb
PostPosted: Thu Jul 14, 2005 9:45 am Reply with quote

if i use this:
Code:
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*)'",

"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"
);

$urlout = array(
"phpnuke-manual-\\1",
"phpnuke-manual.html"
);
The url's are are perfect, but not fuctional. same with using:
Code:
$urlin = array(

"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*).html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'"
);

$urlout = array(
"phpnuke-manual-\\1.html",
"phpnuke-manual.html"
);
 
64bitguy
PostPosted: Thu Jul 14, 2005 9:52 am Reply with quote

na na na na na na.... I know what the problem is!

The page definitions inside the module ITSELF are the cause of the .html endings.

Look at Raven's non-tapped version here at: Only registered users can see links on this board! Get registered or login!

Now, go to one of the pages within the module... you'll notice that they all end .html even though they are not tapped.

This is kind of a problem. You'll need to figure out a way to redefine the pages inside the module itself and then this will all work. I haven't looked at this puppy in forever, but it should not be that hard to strip the ".html" off the page values so that GoogleTapping will work.
 
Raven
PostPosted: Thu Jul 14, 2005 10:24 am Reply with quote

Does mine seem to work now?
 
64bitguy
PostPosted: Thu Jul 14, 2005 10:26 am Reply with quote

Yup! Did you change your rewrite condition to strip out the .html on the output side??
 
Raven
PostPosted: Thu Jul 14, 2005 10:33 am Reply with quote

Not exactly. Here's what I ended up with, assuming posts correctly
Code:
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&page=([a-zA-Z0-9_-]*)\.html'",

"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO&amp;page=([a-zA-Z0-9_-]*)\.html'",
"'(?<!/)modules.php\?name=PHP-Nuke_HOWTO'",

Code:
"nukemanual-\\1.html",

"nukemanual-\\1.html",
"nukemanual.html",

Code:
RewriteRule ^nukemanual-([a-zA-Z0-9_-]*).html modules.php?name= PHP-Nuke_HOWTO&page=$1.html [L]

RewriteRule ^nukemanual.html modules.php?name= PHP-Nuke_HOWTO [L]


Note that I placed a SPACE after name= to get the fool thing to post correctly
 
grantb
PostPosted: Thu Jul 14, 2005 10:36 am Reply with quote

hehehe, seems odd that the Cpanel Guide index.php is set up allmost exactly the same as the php-nuke howto... the HowTo -->
Code:
$ACCEPT_FILE['accelerating-php-nuke.html'] = 'accelerating-php-nuke.html';
and the cpanel gude -->
Code:
$ACCEPT_FILE['cpanelThemes.htm'] = 'cpanelThemes.htm';
Maybe if I changed all those html extentions to .htm in the index.php of the phpnuke Howto.. but I have my doubts..lol
 
grantb
PostPosted: Thu Jul 14, 2005 10:38 am Reply with quote

oops didn't see your post Raven..d*** posting at the same time.. ok I will try that!
 
grantb
PostPosted: Thu Jul 14, 2005 10:50 am Reply with quote

yaaaaaaa!!!!! The url's now work! Everything is converted perfectly except these ones for some reason..
Code:
phpnuke-manual.html?page=credits-version-1.0.html, phpnuke-manual.html?page=credits-versions-1.x.html, phpnuke-manual.html?page=credits-version-2.0.html
Those I think could be the extra "." in the file name?.. Anyways, I can live with that!!.. Thanks again you guys, If it is ok with both of you I would like to post your links on my site under phpnuke, the links module I use pulls the banner from your site (I will disable that part if you are worried about hot-linking. Smile
 
64bitguy
PostPosted: Thu Jul 14, 2005 10:58 am Reply with quote

You need to add a period permission to the rewrite rules... too many periods in those links are causing the problem.
 
grantb
PostPosted: Thu Jul 14, 2005 11:05 am Reply with quote

Thanks again, and on another note, Steph -- 50$ is a hell of a deal for theme html compliance... I sat for two days straight working on mine and still have 85 errors!!
 
grantb
PostPosted: Thu Jul 14, 2005 11:37 am Reply with quote

185 bots crawling the phpnuke HowTo !!! awesome!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> GT - Next Gen and Standard

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©