The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
![]()
why?
|
#22
|
|||
|
|||
![]()
on normal site this code is working why not n the forum omg? oO
|
#23
|
|||
|
|||
![]()
Instead of your plugin using global_start, try using this on global_complete:
Code:
$output = str_replace("example.com", "", $output); but it does seem kind of dangerous (and slower) to replace it globally on the entire output, it would be better to figure out where to do it just for the post contents. |
#24
|
|||
|
|||
![]() Quote:
you mean this code could make it faster? or please give me a better solution i have a big forum so every slow plugin is bad. PHP Code:
|
#25
|
|||
|
|||
![]()
Yeah, you would defintely want to check "THIS_SCRIPT" if you only want it to work on that one page.
To be honest, while it's obviously wise to avoid any unnecessary operations (like checking the entire output when you only need to check the post contents), I don't know that it's enough to be worried about compared to everything else that's going on. If I get a chance I'll look to see if there's a hook to check only the posts. I think I looked a couple days ago and couldn't figure it out, but I'll check again. --------------- Added [DATE]1258761881[/DATE] at [TIME]1258761881[/TIME] --------------- OK, you got me curious so I had to go figure it out. ![]() You could use: Code:
global $vbulletin; if ($vbulletin->userinfo['userid']) { $post['message'] = str_replace("example.com", "", $post['message']); } for the plugin code, and use the "postbit_display_complete" hook, to do it only for posts. This won't do the post titles, if you want the replacement in the titles you'd have to add a second str_replace line for that. (Also I don't think you need to check THIS_SCRIPT this way). BTW, this is what Lynne suggested back in post #16... |
#26
|
|||
|
|||
![]()
Good job kh99 ! working perfect. we thank you
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|