Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hide Images from Guests Details »»
Hide Images from Guests
Version: 4.0, by ForumsMods ForumsMods is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 12-27-2010 Last Update: Never Installs: 113
Uses Plugins
Code Changes Translations  
No support by the author.

Hide Images from Guests

Description:
Allows you to show a message to guests instead of images in posts.

Installation:
  1. Import "product-hideimg_guests.xml" as a product, overwrite if it's already installed
Where 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.

Download Now

File Type: xml product-hideimg_guests.xml (2.0 KB, 657 views)

Screenshots

File Type: png 1.png (8.8 KB, 0 views)
File Type: png 2.png (15.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
mapleleaffans

Comments
  #42  
Old 12-20-2013, 09:01 AM
Acido Acido is offline
 
Join Date: Apr 2003
Location: Argentina
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #43  
Old 12-20-2013, 12:15 PM
Wajow-community Wajow-community is offline
 
Join Date: Dec 2009
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How it can work with vbulletin 4.2.1??? I have installed butt doesn't work.
Reply With Quote
  #44  
Old 12-20-2013, 01:23 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #45  
Old 12-21-2013, 10:09 AM
Wajow-community Wajow-community is offline
 
Join Date: Dec 2009
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec View Post
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?
Reply With Quote
  #46  
Old 02-17-2014, 07:38 PM
aspen0 aspen0 is offline
 
Join Date: Apr 2003
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #47  
Old 02-18-2014, 12:10 PM
aspen0 aspen0 is offline
 
Join Date: Apr 2003
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cric2k View Post
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']);
}
Reply With Quote
  #48  
Old 05-26-2014, 11:42 AM
john7911 john7911 is offline
 
Join Date: Feb 2013
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
How can I change the language to French?
Reply With Quote
  #49  
Old 06-30-2014, 11:21 AM
cric2k cric2k is offline
 
Join Date: Jan 2010
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by aspen0 View Post
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?
Reply With Quote
  #50  
Old 06-30-2014, 11:40 AM
cric2k cric2k is offline
 
Join Date: Jan 2010
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #51  
Old 06-30-2014, 07:12 PM
cric2k cric2k is offline
 
Join Date: Jan 2010
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
Denethor
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:04 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07752 seconds
  • Memory Usage 2,342KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete