| Author |
Message |
RickAllen
Nuke Cadet


Joined: Aug 01, 2003
Posts: 3
|
Posted:
Mon Nov 24, 2003 7:24 am |
  |
I'm having trouble writing a rewrite rule and header.php entry for a calendar module. It uses the date at the end of the url to pull the listing for that date when clicked on. Can someone look at the url below and give me an idea of what I need in htaccess and header.php to get this to work?
| Code: |
| modules.php?name=My_Calendar&file=index&type=day&Date=11/01/2003 |
Thanks. |
|
|
   |
 |
badger
Sergeant


Joined: Apr 02, 2003
Posts: 113
Location: Scotland
|
Posted:
Mon Nov 24, 2003 8:29 am |
  |
I'm having no luck with this either. I was trying to tap the events calendar. The date thing is really anoying. Anyone have any ideas?? |
_________________ The Audio Recording Centre
http://www.audio-recording.co.uk |
|
      |
 |
RickAllen
Nuke Cadet


Joined: Aug 01, 2003
Posts: 3
|
Posted:
Wed Nov 26, 2003 5:25 pm |
  |
Any help would be really appreciated. All my other modules are working fine. Just can't figure this one out. |
|
|
   |
 |
xfsunolesphp
Lieutenant


Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
|
Posted:
Thu Nov 27, 2003 3:14 pm |
  |
| Code: |
"'(?<!/)modules.php\?name=My_Calendar&file=index&type=day&Date=([1-9/]*)'"
|
|
|
|
      |
 |
badger
Sergeant


Joined: Apr 02, 2003
Posts: 113
Location: Scotland
|
Posted:
Thu Nov 27, 2003 4:24 pm |
  |
|
      |
 |
xfsunolesphp
Lieutenant


Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
|
Posted:
Thu Nov 27, 2003 4:25 pm |
  |
it little of easy, but i getting more experience of it. |
|
|
      |
 |
badger
Sergeant


Joined: Apr 02, 2003
Posts: 113
Location: Scotland
|
Posted:
Thu Nov 27, 2003 4:28 pm |
  |
|
      |
 |
xfsunolesphp
Lieutenant


Joined: Apr 05, 2003
Posts: 208
Location: Melbourne, FL
|
Posted:
Thu Nov 27, 2003 4:40 pm |
  |
did you try it on header.php? |
|
|
      |
 |
Audioslaved
Elite Nuker


Joined: Jun 14, 2003
Posts: 420
Location: Hawaii and The Fan Forum
|
Posted:
Thu Nov 27, 2003 8:03 pm |
  |
Badger, that should work with no problems, though it is recommended you escape the character (make it looks like ([1-9\/]*), I am not sure how the date goes, but if it does not contain hyphens or underscores this will work perfectly, you could also make it ([0-9\/]*) which will allow zero's to be used as well. There is no need for additional /'s in this because the star * delimeter is being used, that says it will do any number 0-9 and /'s for zero instances and above. The star * delimeter is for zero and above, + is for one and above { } with a number inside is an exact number of instances, and a { , } with a number on each side of the comma specifies the minimum and maximum range of instances to be used. The only delimeter I normally use for GT is the *, however more advanced regex expressions may require the others be used, such as the preg_replace statement inside of the footer.php on GT-NExtGEn, this regex is a good example of using ranges and stars.
-Bill |
_________________ GT-NExtGEn: The future of GoogleTap
http://gt-nextgen.com/
The Audioslave Fan Forum
http://www.audioslaved.com |
|
     |
 |
badger
Sergeant


Joined: Apr 02, 2003
Posts: 113
Location: Scotland
|
Posted:
Fri Nov 28, 2003 12:48 am |
  |
I was trying at one point to tap the Event Calendar
(holbrookau.net one) and the date format was as above ie: &Date=28/11/03, but in that module there is another variable after the date passesd s well. At the moment I'm really in a guddle with my site due to the betaNC bundle being knackered, but I'm patching and modding up a new 6.9 whenever I get time, so I might stay out of this for now!!
Badger |
_________________ The Audio Recording Centre
http://www.audio-recording.co.uk |
|
      |
 |
|
|