The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Parsing HTML code from a template, to PM. Help??
I'm creating a hack that during one of the processes it takes HTML code from a template and sends it to a specified user as a personal message.
The only problem is the HTML code is not parsed. Say my template called priv_forwardpost contains: Code:
<a href="http://www.lycos.com">hello</a> Code:
<a href="http://www.lycos.com">hello</a> Basically here is the small part of my code where the problem exists: PHP Code:
Thanks if you can help. |
#2
|
||||
|
||||
I would have thought the problem would have been that the PM system doesn't parse HTML (for security reasons) which is why it is appearing as the source.
|
#3
|
||||
|
||||
I've found this more than likely to be the problem after viewing private.php.
What I'm needing help for then is a way to bypass the block just for my hack, but not to interfer with regular PM messanging. For example, say my template priv_forwardpost contained this: Code:
[_url]http://www.lycos.com[/url] Now, wouldn't it seem logical that if I sent this into the database using addslashes(), then it would produce normal when viewing the PM? As parsed? Only problem is that I can't even get this submitted into the database without recieving a database error, something about it containing bbcode in the template is interferring... |
#4
|
||||
|
||||
This should work, I don't see why it shouldn't (I don't know if the " around $message will make a difference or not?).
PHP Code:
|
#5
|
||||
|
||||
Ok..lol, I've found the error but now I'm pondering on a way to fix it.
It error was in the [_url][/url] tag, because in my real code the url contains variables, such as $userid. And code between [_url][/url] cannot contain variables, because they don't get parsed. Now I'm thinking of a way to get these variables parsed before being submitted into the database.. |
#6
|
||||
|
||||
BUAHAH!!
Finally figured it out, thanks for your help anyway NTLDR |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|