The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I've wondered for some time whether there is an easy way to flag part of a post that should only be visible to logged on users. The following hook into showthread_complete does the trick, allowing me to wrap [member] .. [/member] tags around the text. Has anyone already come up with a better way, or have any advice on a better place for the hook? (Or worse, is this already a standard VB feature and I didn't realise??)
Code:
// Remove [member]..[/member] strings unless logged in if ($vbulletin->userinfo['userid']==0) { $postbits = preg_replace('#\[member\].*?\[/member\]#is', '', $postbits); } else { $postbits = preg_replace('#\[member\](.*?)\[\/member\]#is', '\\1', $postbits); } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|