The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
preg_replace in functions_newpost.php help
Help with a preg_replace call in includes/functions_newpost.php
I currently have a simple preg_replace function working, not in the board system. I would like to apply it to all new posts before they are inserted into the DB. This is the original preg_replace PHP Code:
I tried the following to no avail in includes/function_newpost.php PHP Code:
Would also be great if the logic could make it so that the link shown is the original link, while the acutal url= part has the rewritten code. For asthetic purposes, because these links can get rather long. Thanks for the help. |
#2
|
||||
|
||||
What version of vb is this referring to ?
|
#3
|
|||
|
|||
3.03
|
#4
|
||||
|
||||
In that case sorry, I no longer have 3.0, so I don't have the code handy anymore.
|
#5
|
||||
|
||||
not sure if i got you absolutelly right, but if i did, than this line should be the only one you need:
PHP Code:
|
#6
|
|||
|
|||
Hey Xenon,
Thanks for the help. That worked, almost. If i remove the URL BBCode part of your replace section, it works perfect, with no rewrite for the displayed link. If I leave it in, then I get a double attempt at URL BBcode. Right now, I took what you posted, and removed that, so I just get a shortened version of the full link, including the initial http://www.domain.com/out.php?out= Magic wand situation would be if someone types without any BBCODE http://subdomain1.domain1.com/(variable, whatever EX home.php or blahblahblah/) this is generated (Look at link via hover) http://subdomain1.domain1.com/(variable) And, in theory, if someone posts it with bbcode (in the case of editing a post), the same thing happens. I can live with this now though, just people see that there is an outbound tracker attached to these specific links. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|