Author |
Message |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Mon Jun 12, 2006 3:37 pm |
|
ok, this is weird..
php manual is more or less build the same as phpnuke howto and cpanel userguide and i tried to use the same lines with php-manual but non of them works..
any working version around..please post it here if possible.. |
Last edited by hitwalker on Wed Jun 14, 2006 12:46 pm; edited 1 time in total |
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Jun 13, 2006 6:41 am |
|
Which version of GT are you using? The original GoogleTap? GTNG 0.4beta? GTNG 0.4a beta?
The issue is most likely NOT the rewrite rules, but more likely how header.php and footer.php is called in this module. I had the same issues tapping the Journal (yeah, I know, who would want to do that! LOL).
If header.php and/or footer.php is called within a function, one or more of the variables needed (for footer.php most likely) is not being found. You may have to declare it in the global statement within the function. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
hitwalker

|
Posted:
Tue Jun 13, 2006 6:44 am |
|
im using gt nextgen o4,not the update after that..wasnt that 0.4a?
anyway...
the php-manual is build exactly the same as mentioned above..
but then it produces urls like php-manual.html?page=install.windows.html
and whatever link you click,it sits right there on the index but nothing happens... |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 7:00 am |
|
Ok, I see. More details always brings out the true issues...
Lets work on ONE of these to start with. Please post both the original un-tapped link here as well as your urlin/out rules and let me take a look. |
|
|
|
 |
hitwalker

|
Posted:
Tue Jun 13, 2006 7:06 am |
|
well original address would be :
modules.php?name= PHP_Manual
GT-PHP_Manual.php
$urlin = array(
"'(?<!/)modules.php\?name=PHP_Manual&page=([a-zA-Z0-9_-]*)\.html'",
"'(?<!/)modules.php\?name=PHP_Manual&page=([a-zA-Z0-9_-]*)\.html'",
"'(?<!/)modules.php\?name=PHP_Manual'",
);
$urlout = array(
"php-manual-\\1.html",
"php-manual-\\1.html",
"php-manual.html",
); |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 7:24 am |
|
Quote: |
well original address would be :
modules.php?name= PHP_Manual
|
Well, that doesn't help much... lol
This isn't really the complete link to a page is it? |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 7:33 am |
|
hitwalker, I removed your reply, not because there was anything wrong with it, but it was cut off and it wasn't what I was after (no fault of yours). I tried to change it so the code bbcode would work, but gave up...
What I was looking for was for you to "turn off" GT for a minute and post a sample untapped URL. I think I get the structure though based on what you posted.
Have you tried removing the first line in both urlin and urlout? Should only be the last two lines of each... I think... |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 7:35 am |
|
Just had another thought too... I know what is happening. We need to somehow get the "." to be included in the ([a-zA-Z0-9_-]*). Try these and see if one of these works:
([a-zA-Z0-9_-\.]*) OR
([a-zA-Z0-9_-.]*) |
|
|
|
 |
hitwalker

|
Posted:
Tue Jun 13, 2006 1:43 pm |
|
no..
No difference...
i can see its still building up the same url...
and i tried without the forst lines of in and out....
and tried your 2 samples.... |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 9:59 pm |
|
Ok... I am REALLY fishing here.... Try this?
([a-zA-Z0-9_-\\.]*)
Ok, I have to ask you, is the original untapped URL look like this:
modules.php?name= PHP_Manual &page=something.something.html
Obviously without the extra spaces around the PHP_Manual. |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 11:40 pm |
|
You know, you could try to get really "fancy"
([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*) |
|
|
|
 |
hitwalker

|
Posted:
Wed Jun 14, 2006 4:42 am |
|
in your other reply...
yes without my address its like...
modules.php?name= PHP_Manual&page=getting-started.html
modules.php?name= PHP_Manual&page=language.constants.html
modules.php?name= PHP_Manual&page=language.functions.html
modules.php?name= PHP_Manual&page=security.hiding.html
(without space...  |
|
|
|
 |
hitwalker

|
Posted:
Wed Jun 14, 2006 4:48 am |
|
ah....i think your getting close...
the fancy approach now makes the urls like.. php-manual-language.expressions.html
so its getting better...
but it shows page cannot be found... |
|
|
|
 |
grantb
Regular


Joined: Feb 16, 2005
Posts: 67
Location: Canada
|
Posted:
Wed Jun 14, 2006 11:14 am |
|
hello Raven and 64bitGuy helped me on this once before. I am using gt next gen 0.4a Maybe this would help, if it posts right
in htaccess use the format
Code:RewriteRule ^PHP_Manual-([[:alnum:]_-]*).html modules.php?name= PHP_Manual &page=$1\.html
|
Goodluck |
_________________ Only registered users can see links on this board! Get registered or login!
Last edited by grantb on Wed Jun 14, 2006 11:22 am; edited 1 time in total |
|
|
 |
hitwalker

|
Posted:
Wed Jun 14, 2006 11:22 am |
|
thanks...seems like the code you posted is almost gone..
anyway...i did tried it but then my module ends up blank...  |
|
|
|
 |
grantb

|
Posted:
Wed Jun 14, 2006 11:23 am |
|
was just trying to get the urls to post right.. so i shortend it |
|
|
|
 |
hitwalker

|
Posted:
Wed Jun 14, 2006 12:12 pm |
|
well if it works for you then it should for me...can you put up the codes in a text file and show me an address where i can view it? |
|
|
|
 |
hitwalker

|
Posted:
Wed Jun 14, 2006 12:45 pm |
|
ah nevermind grantb....
a comma was missing and didnt saw that..
so yes ...its solved !
im sure you must be glad monty .....
valuable time is saved.....
thank monty and grantb for the help...
ill post the whole stuff again in case someone needs it...
contents of GT-PHP_Manual.php
$urlin = array(
"'(?<!/)modules.php\?name=PHP_Manual&page=([[:alnum:]-\.]*)\.html'",
"'(?<!/)modules.php\?name=PHP_Manual'",
);
$urlout = array(
"PHP_Manual-\\1.html",
"PHP_Manual.html",
);
in your htaccess...
#Php Manual
RewriteRule ^PHP_Manual-([[:alnum:]_-]*).html modules.php?name= PHP_Manual&page=$1\.html [L]
RewriteRule ^PHP_Manual-([[:alnum:]_-]*).([[:alnum:]_-]*).html modules.php?name= PHP_Manual&page=$1\.$2\.html [L]
RewriteRule ^PHP_Manual-([[:alnum:]_-]*).([[:alnum:]_-]*).([[:alnum:]_-]*).html modules.php?name= PHP_Manual&page=$1\.$2\.$3\.html [L]
after checking...lines are published ok...
watch the space between name= and PHP_Manual |
|
|
|
 |
montego

|
Posted:
Thu Jun 15, 2006 6:29 am |
|
Well, now why didn't I think of that? Very nice, simple and elegant.
By the way, my sample would have worked too if you would have then updated the .htaccess rewrite rule to match. Sorry. Just figured you knew that.
However, I like this much better! |
|
|
|
 |
hitwalker

|
Posted:
Thu Jun 15, 2006 6:37 am |
|
well i did made some changes.....
i do recommend that whoever uses it to replace the capitals...
like PHP_Manual.html change to php_manual.html
Google was busy last night looking for a lot of pages starting with php_manual instead of PHP_Manual , so thats what i changed. |
|
|
|
 |
|