The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Replacing Navbar RegEx in PHP
Okay... I have the following code being run on a $navbar...
Code:
$pagenav = construct_page_nav($pagenumber, $perpage, $commentcount['total'], "video.php?do=viewdetails&videoid=", $videoid); $pagenav = preg_replace('/href=".+?videoid=\d+"/i', 'href="#comments" onclick="getComments(1)"', $pagenav); $pagenav = preg_replace('/href=".+?videoid=\d+&page=(\d+)"/i', 'href="#comments" onclick="getComments($1)"', $pagenav); http://www.8wayrun.com/video.php?do=...d=718#comments Using the code above, which is an AJAX init, you can now change the page of the comments on the fly, without having to reload the page. If you are viewing page 1 or 2, everything works fine. However, if you view any page above page 2, the link for page 1 disappears. Is there a reason for this? --------------- Added [DATE]1248999106[/DATE] at [TIME]1248999106[/TIME] --------------- Figured it out... the dot qualifier was WAY too agressive. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|