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); } } |
#2
|
||||
|
||||
Try this:
PHP Code:
|
#3
|
|||
|
|||
That stops converting img in general - so both guests and registered users can not view imgs anymore - in addition it shows the url to the image to guests - But I would like to replace the url and the img tag with a text such as "please register ..."
|
#4
|
||||
|
||||
Hmm ok, see if this one works, just change please register ... to what you want
PHP Code:
|
#5
|
|||
|
|||
That replaces all img tag including guests and registered users ...
|
#6
|
||||
|
||||
Have you tried this? https://vborg.vbsupport.ru/showthread.php?t=256054
|
#7
|
|||
|
|||
No but I tried this one for vb3 and it worked:
https://vborg.vbsupport.ru/showthread.php?t=219631 I saw this mod before but some user said it doesn't work - but in fact it works - Thanks anyway for your immediate help |
Благодарность от: | ||
HMBeaty |
#8
|
||||
|
||||
Ah ok, good! lol
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|