The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hide Images from Guests? class_bbcode.php
Hi,
I would like to hide images from my guests - I tried many different ideas such as this one that comes pretty close: https://vborg.vbsupport.ru/showpost....44&postcount=5 But after all it doesn't work because my code is different. So basically we have to modify "inlcudes/class_bbcode.php" Then the interesting part looks like this: Code:
// If you wanted to be able to edit [img] when editing a post instead of seeing the image, add the get_class() check from above if ($has_img_code & BBCODE_HAS_IMG) { if ($do_imgcode AND ($this->registry->userinfo['userid'] == 0 OR $this->registry->userinfo['showimages'])) { // do [img]xxx[/img] $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode); } else { $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $bbcode); } } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|