| Author |
Message |
link
Corporal


Joined: Mar 01, 2004
Posts: 65
|
Posted:
Sun Jan 29, 2006 6:41 am |
  |
Hello.
I have googletap installed. Works fine.
But id like to extend it to a module of my own.
Here is the .htaccess file... it rewrites them fine..
| Code: |
#Free Samples
Rewriterule ^samples.html modules.php?name=Samples
Rewriterule ^samples_kicks.html modules.php?name=Samples&Sampletype=Kicks
Rewriterule ^samples_snares.html modules.php?name=Samples&Sampletype=Snares
Rewriterule ^samples_hats.html modules.php?name=Samples&Sampletype=Hihats
Rewriterule ^samples_bass.html modules.php?name=Samples&Sampletype=Bass
Rewriterule ^samples_fx.html modules.php?name=Samples&Sampletype=FX
Rewriterule ^samples_loops.html modules.php?name=Samples&Sampletype=Loops
Rewriterule ^samples_misc.html modules.php?name=Samples&Sampletype=Misc
Rewriterule ^samples_pads.html modules.php?name=Samples&Sampletype=Pads
Rewriterule ^samples_vocals.html modules.php?name=Samples&Sampletype=Vocals |
But how would i put that in my header.php file?
Thanks ahead of time NukeCops |
_________________ http://circuitboardfix.com | http://free-loops.com |
|
    |
 |
astalavistabd
Captain


Joined: Dec 19, 2004
Posts: 663
Location: Canada
|
Posted:
Sun Jan 29, 2006 10:39 am |
  |
How did you put your other module's code in header? It should be the same. Im using NextGen Google tap, so it's a bit different for me. I just have to make a GT-file and uplaod it inside my GoogleTap folder and .htaccess modification. Since you dont have any variable it should be simple like this
| Code: |
$urlin = array(
"'(?<!/)modules.php\?name=Samples'"
);
$urlout = array(
"samples.html"
);
|
Do the same for all the pages.  |
_________________ Free PHPNuke Themes, PHPNuke Modules, PHPNuke Blocks (No Registration Required) |
|
        |
 |
link
Corporal


Joined: Mar 01, 2004
Posts: 65
|
Posted:
Sun Jan 29, 2006 5:42 pm |
  |
|
    |
 |
scott2500uk
Private


Joined: Oct 08, 2005
Posts: 43
Location: York UK
|
Posted:
Tue Feb 07, 2006 4:16 pm |
  |
im also doing the same making one of my modules use google tap. Ive found it very easy to do but stubled across a problem. In one of my urls I have:
| Code: |
| modules.php?name=Video_Stream&page=broken&id=21&vidname=A Title With Spaces |
now i have set at the moment in my header:
| Code: |
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)&vidname=([/:\-\'{}()\._&a-zA-Z0-9+=\?\%]*)'",
"videostream-\\1-\\2-\\3.html", |
and in my htaccess:
| Code: |
| RewriteRule ^videostream-([a-z]*)-([0-9]*)-([[:punct:]?/:\-\'{}()._&a-zA-Z0-9+=\%]*).html modules.php?name=Video_Stream&page=$1&id=$2&vidname=$3 |
but my resultant url is:
| Code: |
| videostream-broken-29-Jumping.html%20Around%20The%20Neighborhood |
Could some one be kind enough to tell me how I get the .html at the end and the %20 to show as - so my url would look like
| Code: |
| videostream-broken-29-Jumping-Around-The-Neighborhood.html |
Thank you |
|
|
       |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12482
|
Posted:
Tue Feb 07, 2006 4:35 pm |
  |
|
     |
 |
scott2500uk
Private


Joined: Oct 08, 2005
Posts: 43
Location: York UK
|
Posted:
Tue Feb 07, 2006 4:52 pm |
  |
doing that places the .html in correct place:
| Code: |
| videostream-broken-29-Jumping%20Around%20The%20Neighborhood.html |
now can i just add a new rewrite that takes %20 and replaces it with -. if so how? |
|
|
       |
 |
scott2500uk
Private


Joined: Oct 08, 2005
Posts: 43
Location: York UK
|
Posted:
Wed Feb 08, 2006 5:12 am |
  |
ok nvm Ive just used str_replace() to make spaces, dashes. |
|
|
       |
 |
|
|