vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Hide Images from Guests (https://vborg.vbsupport.ru/showthread.php?t=256054)

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

Quote:

Originally Posted by sv1cec (Post 2469683)
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

Quote:

Originally Posted by cric2k (Post 2461779)
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

Code:

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

Quote:

Originally Posted by aspen0 (Post 2482092)
This made it work for me. My Plugin code nowlooks like

Code:

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

Quote:

Originally Posted by cric2k (Post 2504650)
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

Quote:

Originally Posted by friendlymela (Post 2556422)
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

Quote:

Originally Posted by RichieBoy67 (Post 2556478)
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?


All times are GMT. The time now is 12:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01073 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete