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, 70 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Help google tapping a custom module [ ]
 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
johnnycard
Corporal
Corporal


Joined: May 29, 2003
Posts: 52

Location: UK

PostPosted: Sat Nov 01, 2003 7:50 am Reply with quoteBack to top

Can anyone help me Tapping a module, I've been pulling my hair out most of today trying to do it but to no avail...

modules.php?name=Test&file=testfile&testfile=00123

(the 00123 at the end is always a 5 digit number)

The URL I would like for this would be:

test-testfile-00123.html

I've done the easy so bit so far as getting test.html to replace modules.php?name=Test by adding a new entry to the .htaccess file...

Code:
RewriteRule ^test.html modules.php?name=Test


Any assistance in the tricky bits would be greatly appreciated

JC
Find all posts by johnnycardView user's profileSend private message
gammacorrection
Nuke Cadet
Nuke Cadet


Joined: Jun 08, 2003
Posts: 6


PostPosted: Sun Nov 02, 2003 2:43 am Reply with quoteBack to top

I think what you have done so far is not entirely correct.

This is what you put in the .htaccess file:
Quote:
RewriteRule ^test.html modules.php?name=Test


There is no reference in there to the dynamic variables which is really the whole point in the first place.

To make both file and testfile call the dynamic variables, .htaccess should have the following line:

Code:
RewriteRule ^test-([a-zA-Z0-9_]*)-([0-9]*).html modules.php?name=Test&file=$1&testfile=$2


I am pretty sure that that will work, though I havnt actually played around with letters yet, just numbers. The [0-9] part by itself will definitely work calling the 5 digit code you want.

Now, after you do that open your header.php (which you should have already modified with the GT instructions).

There are two arrays you are looking for with tons of strings in them. One is called 'urlin' the other 'urlout'. In this case of course, they are all of the links we are renaming. I havn't read this, but I am more than sure given they are arrays that you MUST KEEP THEM IN ORDER. Meaning, if you add something to position 1 in 'urlin' it must match position 1 in 'urlout'. To keep it simple, just append them both at the very bottom.

If you havnt yet modified them, the last few lines should look something like this for 'urlin':

Code:
"'(?<!/)modules.php\?name=Web_Links&l_op=viewlink&amp;cid=([0-9]*)&amp;orderby=([a-zA-Z0-9]*)'",
"'(?<!/)modules.php\?name=Web_Links&l_op=viewlink&amp;cid=([0-9]*)&amp;min=([0-9]*)&amp;orderby=([a-zA-Z0-9]*)&amp;show=([0-9]*)'",
"'(?<!/)modules.php\?name=Web_Links&l_op=viewlink&amp;cid=([0-9]*)'",
"'(?<!/)modules.php\?name=Web_Links'"


Put a comma after the last existing line and then add the following line:

Code:
"'(?<!/)modules.php\?name=Test&amp;file=([a-zA-Z0-9_]*)&amp;testfile=([0-9]*)'"


Now go to the other array 'urlout' which should be below that one. The last few lines will look like this (if not already modified):
Code:

"viewlink-\\1.html",
"links-\\1-\\2.html",
"links-\\1-\\2-\\3-\\4.html",
"link-\\1.html",
"links.html"


Again, add a comma after that last .html and then add the following new line:

Code:
"test-\\1-\\2.html"


Save that and give it a go. It should work. Very Happy
-kevin
Find all posts by gammacorrectionView user's profileSend private message
Mesum
Support Staff
Support Staff


Joined: Mar 11, 2003
Posts: 842

Location: Chicago

PostPosted: Sun Nov 02, 2003 6:40 am Reply with quoteBack to top

Nice one dude.

_________________
Only FREE Dating site for Desis.
Find all posts by MesumView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
johnnycard
Corporal
Corporal


Joined: May 29, 2003
Posts: 52

Location: UK

PostPosted: Sun Nov 02, 2003 7:10 am Reply with quoteBack to top

Many thanks gammacorrection for your thorough and helpful answer

That did the job nicely, what a star you are!

Very Happy

JC
Find all posts by johnnycardView user's profileSend private message
gammacorrection
Nuke Cadet
Nuke Cadet


Joined: Jun 08, 2003
Posts: 6


PostPosted: Sun Nov 02, 2003 4:04 pm Reply with quoteBack to top

Glad I could be of assistance. PM me your site when you get it running, I'd like to take a look.
Find all posts by gammacorrectionView 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
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.383 Seconds - 274 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::