PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Thu Jun 15, 2006 6:24 am Reply with quote Back to top

Hello,

I was just reading hitwalker's thread here:
Only registered users can see links on this board!
Get registered or login to the forums!


And I figured I would ask if anybody has any working Googlifier code for this module? It seems very similar but I can't get it working from the above posted sample.

For those of you that don't know/remember Googlifier, it has only 3 parts, in 2 files. For example:

In .htaccess:
Code:
RewriteEngine On

RewriteRule ^index.html /index.php

RewriteRule ^gate.html /modules.php

#Articles
RewriteRule ^article([1-9][0-9]*).* /gate.html?name=News&file=article&sid=$1
RewriteRule ^article([1-9][0-9]*).html /gate.html?name=News&file=article&sid=$1&mode=$2&order=$3&thold=$4
RewriteRule ^topic([1-9][0-9]*)-([0-9]*).* /gate.html?name=News&new_topic=$1&pagenum=$2
RewriteRule ^topic([1-9][0-9]*).* /gate.html?name=News&new_topic=$1
RewriteRule ^cat([1-9][0-9]*)-([0-9]*).* /gate.html?name=News&file=categories&op=newindex&catid=$1&pagenum=$2
RewriteRule ^cat([1-9][0-9]*).* /gate.html?name=News&file=categories&op=newindex&catid=$1
RewriteRule ^cat([1-9][0-9]*)-([0-9]*).* gate.html?name=News&file=article&op=newindex&catid=$1&pagenum=$2
RewriteRule ^cat([1-9][0-9]*).* /gate.html?name=News&file=article&op=newindex&catid=$1
RewriteRule ^printout([1-9][0-9]*).* /gate.html?name=News&file=print&sid=$1
RewriteRule ^newspage([1-9][0-9]*).* /gate.html?name=News&pagenum=$1
RewriteRule ^comment([0-9]*)-([0-9]*)-([0-9]*)-([a-zA-Z0-9]*)([0-9]*)([/:|\s\-\'{}().&_0-9+=]*).html /gate.html?name=News&file=comments&op=showreply&tid=$1&sid=$2&pid=$3&mode=$4&order=$5&thold=$6
RewriteRule ^articles.* /gate.html?name=News&file=index


In header.php
Code:
$urlin =
array(
"'(?<!/)index.php'",
"'(?<!/)modules.php'",
"'(?<!/)gate.html\?name=News&amp;file=comments&amp;op=showreply&amp;tid=([0-9]*)&amp;sid=([0-9]*)&amp;pid=([0-9]*)&amp;mode=([a-zA-Z0-9+]*)&amp;order=([0-9]*)&amp;thold=([/:|\s\-\'{}().&_0-9+=]*)'",
"'(?<!/)gate.html\?name=News&amp;file=categories&amp;op=newindex&amp;catid=([0-9]*)&amp;pagenum=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=categories&amp;op=newindex&amp;catid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=categories&amp;op=newindex&amp;catid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=article&amp;op=newindex&amp;catid=([0-9]*)&amp;pagenum=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=article&amp;op=newindex&amp;catid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;op=newindex&amp;catid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=article&amp;sid=([0-9]*)&amp;mode=([a-zA-Z0-9+]*)&amp;order=([0-9]*)&amp;thold=([/:|\s\-\'{}().&_0-9+=]*)'",
"'(?<!/)gate.html\?name=News&amp;file=article&amp;sid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&file=article&sid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;new_topic=([0-9]*)&amp;pagenum=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;new_topic=([0-9]*)'",
"'(?<!/)gate.html\?name=News&new_topic=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=print&amp;sid=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;pagenum=([0-9]*)'",
"'(?<!/)gate.html\?name=News&amp;file=index'",
"'(?<!/)gate.html\?name=News&file=index'"
);

$urlout = array(
"index.html",
"gate.html",
"comment\\1-\\2-\\3-\\4\\5\\6.html",
"cat\\1-\\2.html",
"cat\\1.html",
"cat\\1.html",
"cat\\1-\\2.html",
"cat\\1.html",
"cat\\1.html",
"article\\1.html",
"article\\1.html",
"article\\1.html",
"topic\\1-\\2.html",
"topic\\1.html",
"topic\\1.html",
"printout\\1.html",
"newspage\\1.html",
"articles",
"articles"
);

$s = preg_replace($urlin, $urlout, $s);
return $s;
}


The above would be the whole Articles section.

If I remember right, GT has additional files that need edited like session.php, mainfile.php, etc. I guess that's why hitwalker's code won't work.

Any working code out there for the PHP_Manual module?
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Thu Jun 15, 2006 6:32 am Reply with quote Back to top

Quote:

If I remember right, GT has additional files that need edited like session.php, mainfile.php, etc. I guess that's why hitwalker's code won't work.

Any working code out there for the PHP_Manual module?


Has nothing to do with why hitwalkers code did not work. It was strictly an issue of not having all the right rules in place. It was missing key "punctuation", basically the period ".". He had not placed the right rewrite rule back in .htaccess.

Can you post the lines for urlin/out and .htaccess just for your Googlefier version of the PHP_Manual "tap"? It really works exactly as GTNG does in terms of how the replacements and rewrite work so we should be able to get this to work.
View user's profile Send private message Visit poster's website
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Thu Jun 15, 2006 6:45 am Reply with quote Back to top

I have no code for it at all currently. That's what I was asking for.

I tried posting his code that he posted at the end and it just didn't work. I got a 500 server error. I tried a few things like removing the "[L]" at the end (because the rest of my code doesn't have that), and changing "modules.php" to "gate.html" (because that's how Googlifier was designed to work). And I just couldn't get it working.

So I have no current code at all to show you.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Thu Jun 15, 2006 7:16 am Reply with quote Back to top

Ok, fair enough. By the way, the [L] should be added to the end of each of your rewrite rules as it helps to save processing time/resources. What it means is as soon as a "hit" is found it does not have to go any further (for that ONE link).

Ok, so it looks like the urlin line might be this:

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

The urlout:

"php_manual-\\1.html",

The .htaccess:

RewriteRule ^php_manual-([[:alnum:]_-]*).html /gate.html?name= PHP_Manual&page=$1\.html [L]

Now, this is only the first rewrite rule of potentially 3 - 4. I am only giving you possible sample to work from. This is NOT tested and you may have to tweak it slightly to get it to work for you.
View user's profile Send private message Visit poster's website
manunkind
Client


Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM

PostPosted: Thu Jun 15, 2006 8:30 pm Reply with quote Back to top

Ok, I'll play with it. Thanks! Smile
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum