View Full Version : Show Thread Enhancements - Hide Images from Guests
ForumsMods
12-27-2010, 10:00 PM
Hide Images from Guests
Description:
Allows you to show a message to guests instead of images in posts.
Installation:
Import "product-hideimg_guests.xml" as a product, overwrite if it's already installedWhere to set option:
Settings-> Options-> Thread Display Options (showthread)-> Enable Hide Images from Guests
Languages:
- English
History:
28-12-10: v4.0 First Release
This hack is created for your use free of charge. No payment is requested. However, if you would like to donate money for the work I put in to this hack, a donation would show your appreciation.
demonfatal
12-28-2010, 03:04 PM
Installed & Rated!
AURFSCAN
12-28-2010, 04:57 PM
good idea and works for linked images but needs a lil work
doesnt seem to want to play nice with MARCO1 hideall mod
and
doesnt work at all with Sevenskins Image resizer
tagged and thx
:)
demonfatal
12-28-2010, 05:40 PM
Strange, works fine for me with "SevenSkins Image Resizer 1.3" and "MARCO1 Hide links for visitors..."
OldSchoolDSL
01-17-2011, 12:42 PM
Installed
4.1 PL2 (test site 4.1.1)
creative-friend
02-02-2011, 08:17 PM
which images does it hide??
attachments?? attachments area alreaady disabled for guests
i want other images to hide from guests...
ForumsMods
02-02-2011, 09:40 PM
which images does it hide??
attachments?? attachments area alreaady disabled for guests
i want other images to hide from guests...
All images (non smilies) posted in messages are hided
AURFSCAN
02-03-2011, 04:33 AM
doesnt seem to want to play nice with MARCO1 hideall mod
and
doesnt work at all with Sevenskins Image resizer
with a couple of phrase changes and a smack to the backside of my browsers head this works fine with both.
thx for the mod :)
archet1337
08-06-2011, 10:13 AM
Brilliant! Just what I was looking for. Thanks for sharing :)
installed on 4.1.5 n works on me
Khriz
12-07-2011, 09:34 PM
no work on 4.1.8 xD
JohnSG
05-23-2012, 08:24 AM
Not working on 4.1.10 either
JohnSG
05-24-2012, 06:41 AM
Got it to work....kinda, it works on some posts but not others, anyone else getting that, anyone know of any reason why it would be doing that. I had first thought it may be the difference between url link and attached image, but no its totally random.
Not working in vBulletin 4.1.12
cuco88
06-18-2012, 07:01 AM
not working in 4.2.0 either...
iadventure
07-13-2012, 08:40 PM
how do I change the message it gives?
ForumsMods
07-13-2012, 09:16 PM
how do I change the message it gives?
Edit hideimg_message phrase
iadventure
07-13-2012, 09:22 PM
thx!!!
iadventure
07-13-2012, 09:29 PM
worked on 4.1.10 and 4.1.12
del Drago
07-20-2012, 03:50 AM
So this doesn't work on 4.2?
Is there another way to accomplish this?
magnaromagna
07-30-2012, 07:42 AM
Installed, and worked sometimes.
Re-installed, did not work
Is it works on 4.2?
Draffi
09-01-2012, 11:53 PM
Dont work with vb-Suite 4.2!
I am about to upgrade to 4.2 but i need this mod to work :(
john7911
03-30-2013, 09:34 PM
Looking for this for 4.2.0.
Thank you ;)
works as charm on 4.2 pl3
War Machine
06-18-2013, 06:53 PM
It works on 4.2.0, but i have a problem with spiders, it affect seo research!!!
cric2k
11-15-2013, 09:03 AM
Doesn't work on 4.1.9, [ IMG ] code still displays embeded images from other site?
cric2k
11-15-2013, 09:27 AM
I've figured out that the "$this->post['pagetext_html'] =.." is not referencing the postbit code in the plugin php.
Edit: "$this->post['pagetext_html'] =.." contains the html and is replacing the characters to give the Guest error message, but it is not actually affecting the postbits which are displayed on the final page, either it is being over-written in later executed code or the actual outputted html is populated in another variable.
cric2k
11-18-2013, 11:56 AM
For anyone else who can't get this working, or is struggling to get it to work on all threads - I found another plugin was fighting with it - and also modify the plugin so that it also references the 'pagetext' variable which was for some reason used in about half my threads, so... copy the $this->post['pagetext_html']... bit and paste a $this->post['pagetext']... version as well.
sv1cec
11-29-2013, 10:48 AM
Does it show you the message it should show, or something like this:
<font color="red">Guests can not see images in the messages. Please register in the forum by clicking <a href="register.php"><strong>here</strong></a>.</font>]
Never mind, figure this out, the phrase should be entered in vBulletin language, not HTML. Here is what I entered and worked in 4.2.2:
No Images for Guests.
sv1cec
12-16-2013, 09:17 AM
Is there a way to change this hack, so that you show a default image instead of a text message, to guests? I would certainly appreciate it, since I had such a hack in my old 3.0.xx site and I miss it.
Acido
12-18-2013, 10:22 PM
This is not working for vb 4.2.2
Can someone give a hand? I'm trying the code in different hooks, but still can't make it work :(
sv1cec
12-19-2013, 06:15 PM
Works fine for me in 4.2.2. What is the problem you have?
Acido
12-19-2013, 06:47 PM
It is hidding just a small number of images. Must images on posts of the threads are ignoring this hack. I'm looking for another mod that can give conflict, but none of them are using that hook ( postbit_display_start )
Wajow-community
12-19-2013, 06:52 PM
Doesn't work for vbulletin 4.2.1??
sv1cec
12-19-2013, 07:37 PM
Acido, can you post a link to a page where some images are hidden and some are not?
Acido
12-19-2013, 08:27 PM
Thanks sv1cec
Working Thread (http://www.webconferencia.net/los-mejores-ejemplares-masculinos/mike-vogel-551455.html)
Not Working Thread (http://www.webconferencia.net/actualidad/marianela-mirra-hoy-551440.html)
Hope it help.
sv1cec
12-19-2013, 09:49 PM
What I can see from your links is that you are using a different style than the default vBulletin one. Try creating a new style, using the default vB templates and see how that works. Also, please tell me if the pictures that are NOT shown, are attachments or externally linked pictures. It appears that the pictures shown are attachments (stored in your own server, not in Photobucket, or an other web server). Is the same true for the ones not shown?
Acido
12-19-2013, 09:58 PM
What I can see from your links is that you are using a different style than the default vBulletin one. Try creating a new style, using the default vB templates and see how that works. Also, please tell me if the pictures that are NOT shown, are attachments or externally linked pictures. It appears that the pictures shown are attachments (stored in your own server, not in Photobucket, or an other web server). Is the same true for the ones not shown?
I'm sure it's no a Style issue. The default style have the same effect with the imagen. But i notice that the problem is with the attachments.. Not with external images. This is a link with the default style: Thread (http://www.webconferencia.net/actualidad/marianela-mirra-hoy-551440.html?styleid=83)
Edit: is not working with external images too... Thread (http://www.webconferencia.net/andrea-rincon/fotos-y-capturas-de-andrea-rincon-413318-9.html?styleid=83)
sv1cec
12-20-2013, 08:35 AM
Well, I checked my site and sure enough, visitors do not see photographs. Have a look here:
http://forum.m1911.org/showthread.php?105711-New-RIA-Tactical
In the first post, there are three images, stored in Photobucket and there are three attachments shown as thumbnails. Obviously the external images do not show, and from the list of the attachments you can't open one of them. So I guess it is something else, specific to your site.
Acido
12-20-2013, 09:01 AM
Thanks for your help sv1cec. I was checking the plugin, and it is giving troubles with the preg_replace function. Works with any thing that i want insert into the post, but that function is not working on my installation. May be it's another hack giving conflicts, or my php version (5.3.3-7+squeeze16)
I stop to work with this mod because i choose another method to control the images in my site. So i unistall it. May be in the future i'll back to this mod.
Thanks!
Wajow-community
12-20-2013, 12:15 PM
How it can work with vbulletin 4.2.1??? I have installed butt doesn't work.
sv1cec
12-20-2013, 01:23 PM
As I said, it works with 4.2.2. Have you set the "hideimg_enabled" setting to Yes? I don't remember where exactly that can be found, but it should be somewhere. The plugin checks if you have set that, if not it won't work.
Ah yes, here: Settings-> Options-> Thread Display Options (showthread)-> Enable Hide Images from Guests
Wajow-community
12-21-2013, 10:09 AM
As I said, it works with 4.2.2. Have you set the "hideimg_enabled" setting to Yes? I don't remember where exactly that can be found, but it should be somewhere. The plugin checks if you have set that, if not it won't work.
Ah yes, here: Settings-> Options-> Thread Display Options (showthread)-> Enable Hide Images from Guests
Yes i have set it on butt don't work with vbulletin 4.2.1.. what can i do to make it work?
aspen0
02-17-2014, 07:38 PM
It isn't working for me anymore either, it had been working, but it stopped with the 4.2.2 upgrade.
I've tried it with a default style as well, doesn't seem to help at all.
This is a very important thing to have if you run Google adsense, they've been very strict lately with user uploaded photos.
aspen0
02-18-2014, 12:10 PM
For anyone else who can't get this working, or is struggling to get it to work on all threads - I found another plugin was fighting with it - and also modify the plugin so that it also references the 'pagetext' variable which was for some reason used in about half my threads, so... copy the $this->post['pagetext_html']... bit and paste a $this->post['pagetext']... version as well.
This made it work for me. My Plugin code nowlooks like
if($this->registry->options['hideimg_enabled'] AND $show['guest'])
{
$this->post['pagetext_html'] = preg_replace('/\[IMG\](.*)\[\/IMG\]/im', construct_phrase($vbphrase['hideimg_message'], $session['sessionurl_q']), $this->post['pagetext_html']);
$this->post['pagetext'] = preg_replace('/\[IMG\](.*)\[\/IMG\]/im', construct_phrase($vbphrase['hideimg_message'], $session['sessionurl_q']), $this->post['pagetext']);
}
john7911
05-26-2014, 11:42 AM
Thank you
How can I change the language to French?
cric2k
06-30-2014, 11:21 AM
This made it work for me. My Plugin code nowlooks like
if($this->registry->options['hideimg_enabled'] AND $show['guest'])
{
$this->post['pagetext_html'] = preg_replace('/\[IMG\](.*)\[\/IMG\]/im', construct_phrase($vbphrase['hideimg_message'], $session['sessionurl_q']), $this->post['pagetext_html']);
$this->post['pagetext'] = preg_replace('/\[IMG\](.*)\[\/IMG\]/im', construct_phrase($vbphrase['hideimg_message'], $session['sessionurl_q']), $this->post['pagetext']);
}
Yeah that's pretty much what I'm doing - although it also seems to have affected random logged in members on certain styles (where they are logged in and can't see images). The crazy thing is that even if I disable the plugin it still hides the images for the logged in member, so it's as if the PHP logic itself has been stored in the post. If I edit and save the post as an admin after the plugin has been disabled it removes the logic and everyone can now see the image - anyone any ideas?
cric2k
06-30-2014, 11:40 AM
oh it turns out the replaced text is being stored in the vb_postparsed table, as if it's a guest - but only on one styleID and not on another styleID. Maybe the guest reading the page is caching it first - anyone any ideas?
cric2k
06-30-2014, 07:12 PM
After a lot of hours I figured out how to finally get this working properly.
It turns out that the first person to view a thread via showthread.php would cache that version of the thread in vb_postparsed - so if a guest views the thread first it is cached with the replaced text and everyone else who uses that style logged in or not will have the cached version.
I've managed to get around this by having a copy of a style dedicated to guests, setting it as the default and using the Restrict Style to Usergroup mod https://vborg.vbsupport.ru/showthread.php?t=95910 to prevent logged in members from changing to that style.
Denethor
07-22-2014, 06:30 AM
Is this working with 4.2.2 yet? If it is, could someone please advise? I can't get it to function properly.
aspen0
06-28-2015, 01:49 PM
After a lot of hours I figured out how to finally get this working properly.
It turns out that the first person to view a thread via showthread.php would cache that version of the thread in vb_postparsed - so if a guest views the thread first it is cached with the replaced text and everyone else who uses that style logged in or not will have the cached version.
I've managed to get around this by having a copy of a style dedicated to guests, setting it as the default and using the Restrict Style to Usergroup mod https://vborg.vbsupport.ru/showthread.php?t=95910 to prevent logged in members from changing to that style.
I tried that and it didn't work. Specifically I made the style, I restricted it to guests, and made it default, and that all worked - but it was also then default for all members who had to actively decide to switch it. What I really needed was multiple default styles. I found a different mod, force style on usergroup, and seemed to work, except it wouldn't force a style to my guests, only to other usergroups (why, I'm not sure). So I forced all registered members to another usergroup, and let the guests by in the default one.
I wonder if a better overall fix would be to edit the plugin so the image removal is done AFTER the post content is pulled from the cache, not before. Anyone know how to do that?
If any of these features would be better supported in VB 5 I might be enticed to finally upgrade, anyone know?
friendlymela
10-06-2015, 08:22 AM
This is effective for Forum SEO
RichieBoy67
10-07-2015, 04:43 AM
This is effective for Forum SEO
Why is that?
If you have good images with good titles and have your images set to use a title tag and alt txt images are great for seo. How would removing them help with seo?
friendlymela
10-07-2015, 06:27 AM
Why is that?
If you have good images with good titles and have your images set to use a title tag and alt txt images are great for seo. How would removing them help with seo?
How it will be index on google?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.