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, 49 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 - Googletapping search-function [ ]
 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
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Sat Nov 22, 2003 12:45 am Reply with quoteBack to top

Hello,

is it possible to googletap the search-function like this:

http://www.luchtzak.be/gate.html?name=Search&query=xxxxx

becomes

http://www.luchtzak.be/search-xxxxx.html

And how to do so ?

greetings,

Bart

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
Audioslaved
Elite Nuker
Elite Nuker


Joined: Jun 14, 2003
Posts: 420

Location: Hawaii and The Fan Forum

PostPosted: Sat Nov 22, 2003 1:07 am Reply with quoteBack to top

It has been done in the GT-NExtGEn already, but I will explain it a bit here.

The most important part is the source code of the file because it contains the URL's we wish to tap, if you grab a URL from the search module like the one below, we will tap it together. This is our URL
Code:

modules.php?name=$module_name&query=&topic=$topic


First, we replace $module_name with Search and put it in the proper header.php quotation marks, that gives us
Code:

"'(?<!/)modules.php\?name=Search&amp;query=&amp;topic=$topic'",


From there we substitute the variables with their proper regex expressions, those would happen to be this:
Code:

([a-z]*) <--lower case only
([a-zA-Z]*) <-- Upper and lower case
([0-9]*) <--Numbers only
([a-zA-Z0-9]*) upper, lower, and numbers
Special characters if needed can be put in the end like this, beware that punctuation will need to be followed like a backslash
([a-zA-Z0-9=\;\,\.\?\!=_-]*)

Now that we know what the regex's are for the variables, we replace our variables with those regex's
Code:

"'(?<!/)modules.php\?name=Search&amp;query=([a-zA-Z0-9_-]*)&amp;topic=([0-9]*)'",


The first portion of the header.php is complete, now we must complete the $urlout array, note that these have to match, so if the above statement is the fifth down in your list, the $urlout match must be the fifth down as well. Lets make the match this:

Code:

"search-\\1-\\2.html",


The \\1 indicates the first group which is ([a-zA-Z0-9_-]*) and equal to that of the query.
The \\2 indicates the second group which is ([0-9]*) and equal to that of $topic

From here we must build our .htaccess statement, this is easy as we have already done all the work.
Code:

RewriteRule ^search-([a-zA-Z0-9_-]*)-([0-9]*).html modules.php?name=Search&query=$1&topic=$2


The $1 and $2 are the same as the \\1 and \\2 above, they are used as groups, the $1 substitutes the contents of ([a-zA-Z0-9_-]*) and the $2 is for the contents of ([0-9]*). When you click search-blah-1.html it takes that URL and plugs it into the search-([a-zA-Z0-9_-]*)-([0-9]*).html portion if it fits (which it does), it then takes those matching values and put them in the longer URL and executes that behind the scenes. Hope some of this made sense, that is how it basically works. Those regex above can be used on most variables, if you go to gt.audioslaved.com you will see the search should be fully tapped, feel free to test the beta 0.2 and see if this is what you are looking for.

-Bill (Audioslaved)

_________________
GT-NExtGEn: The future of GoogleTap
http://gt-nextgen.com/

The Audioslave Fan Forum
http://www.audioslaved.com
Find all posts by AudioslavedView user's profileSend private messageSend e-mailVisit poster's website
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Sat Nov 22, 2003 3:08 am Reply with quoteBack to top

Bill,

I did what you suggested and it works fine:

http://www.luchtzak.be/search-american-23.html

But which sign do I have to enter if I want to search for 'american airlines'

[url] www.luchtzak.be/search-american airlines-23.html [/url] gives me 404

And what figure do I need to enter if I want to search for 'american airlines' not only in topic 23 but in every article ?

And how do I need to configure my search-box on the frontpage so the search comes into a nice GT-url ?

thanks allready and greetings,

Bart

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Sat Nov 22, 2003 3:23 am Reply with quoteBack to top

And www.luchtzak.be/search-american.html gives me a 404 too ...

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
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
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.174 Seconds - 164 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::