Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Stop Members Bypassing Restrictions By Logging Out Details »»
Stop Members Bypassing Restrictions By Logging Out
Version: 2.0, by AngelBlue AngelBlue is offline
Developer Last Online: May 2018 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.6.8 Rating:
Released: 03-06-2008 Last Update: 04-08-2008 Installs: 27
Uses Plugins
Re-useable Code Translations  
No support by the author.

This addon has been withdrawn.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-07-2008, 07:27 PM
Konstantinos Konstantinos is offline
 
Join Date: Apr 2006
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so its useless for admins who already have guests not be able to view the forum
Reply With Quote
  #13  
Old 03-07-2008, 07:53 PM
AngelBlue AngelBlue is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Konstantinos View Post
so its useless for admins who already have guests not be able to view the forum
No, actually it is quite useful for them!

The biggest reason to let guests see your forum is to entice them to register by showing them what they COULD get if they registered.

The biggest reason not to let guests see your forum is to force them to register - if they can browse as a guest, why do they need to register?

With this mod, you can let first time visitors see your forum, so they are tempted into registering, and once registered, they have to remain logged-in to view the forum. So you can get the best of both worlds. This mod works especially well with the limited guest viewing system, forming a combination that drives people to register and then stay registered and logged in.
Reply With Quote
  #14  
Old 03-08-2008, 07:08 PM
Big Boss's Avatar
Big Boss Big Boss is offline
 
Join Date: Jan 2008
Location: Cleveland, OH
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this! Been waiting for something like this for a long time.
Reply With Quote
  #15  
Old 03-13-2008, 01:07 AM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I edited that piece of code just as you said..and I am not sure why it isn't working but as a banned user I can log off and log back in just fine ( and see the forum after log out )..all that.
Reply With Quote
  #16  
Old 03-13-2008, 02:23 AM
AngelBlue AngelBlue is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The cookie only gets set when the member views a thread or forum. If you try to test this by clearing your cookies then logging into an *already banned* account, it won't work.... because you don't have the cookie.
It would, however, work for the person that was banned, because they would (presumably) have viewed at least one thread before they got banned, and thus would have the cookie set.

If you *really* want it to work for banned users who have cleared their cookies previously, you could add something like the following to the plugin definitions :
Code:
		<plugin active="1">
			<title><![CDATA[NGB System [Profile Start Check]]]></title>
			<hookname>global_start</hookname>
			<phpcode><![CDATA[
                         if ($userinfo['usergroupid'] == 8) {
			     ($hook = vBulletinHook::fetch_hook('ngb_plugin')) ? eval($hook) : false;
                         }
			]]></phpcode>
		</plugin>
Doing this would, however, probably be pointless, because if the banned person has cleared their cookies once since they last viewed a thread, the odds are they will just clear their cookies again if you re-set the cookie when they login with a banned account.
Reply With Quote
  #17  
Old 03-13-2008, 07:32 PM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, would this be an adequate test of the system:

Make a user
look at a thread
Ban that user
Login as that user and test?

Would that be a good test/would it hurt my other account at all?
Reply With Quote
  #18  
Old 03-13-2008, 09:54 PM
AngelBlue AngelBlue is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bigcurt View Post
OK, would this be an adequate test of the system:

Make a user
look at a thread
Ban that user
Login as that user and test?

Would that be a good test/would it hurt my other account at all?
Banning one user shouldn't affect any other user accounts unless you have something like AE Multiple Login Detection installed.

Once you have viewed a thread while logged in (you have to not be in vB's default banned usergroup, id 8, in order to read threads), it should deny you the ability to read the forum threads as a guest, until you clear your cookies.

What exactly are you trying to test? Are you trying to test that this product will stop people who have previously read a thread while logged in from continuing to read threads if they log out? If so, just install, read a thread, logout, and see if you can still read threads.

Are you trying to test that this mod stops users you have banned from browsing the forum as a guest? It will stop them reading threads, but only if they read at least one thread before you banned them.
Reply With Quote
  #19  
Old 03-15-2008, 12:04 AM
Allnick Allnick is offline
 
Join Date: Feb 2006
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is an interesting add on.
One thing though.....I find it good practise to view as a guest myself at times.
For instance after creating a new forum and setting permissions. I need to see what guests can view, as well as registered users.

I presume Admin (me) would have to clear cookies to view as a guest.
It would be good to have the Admin account unaffected.
Reply With Quote
  #20  
Old 03-15-2008, 03:31 AM
AngelBlue AngelBlue is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Allnick View Post
This is an interesting add on.
One thing though.....I find it good practise to view as a guest myself at times.
For instance after creating a new forum and setting permissions. I need to see what guests can view, as well as registered users.

I presume Admin (me) would have to clear cookies to view as a guest.
It would be good to have the Admin account unaffected.

Try editing the product file before importing, replacing:
Code:
					if (!isset($_COOKIE['NGBaccess'])) {
						// we do NOT use vbsetcookie, because cookies set with vbsetcookie() are erased when the user logs out!
						setcookie("NGBaccess", "yes", time()+31104000, "/");
					}
with:
Code:
					if (
					 !isset($_COOKIE['NGBaccess']) AND
                                         !in_array($bbuserinfo['usergroupid'], array(6)) )
					) {
						// we do NOT use vbsetcookie, because cookies set with vbsetcookie() are erased when the user logs out!
						setcookie("NGBaccess", "yes", time()+31104000, "/");
					}
You can replace the "6" here with "6,5" (IIRC) to also exempt supermods. You will need to clear your cookies once before this exemption applies.
Reply With Quote
  #21  
Old 03-24-2008, 12:42 AM
AngelBlue AngelBlue is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Removed the beta tag, as this hack has been in use for awhile now without issues.
Reply With Quote
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 11:30 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.04483 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
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
  • (3)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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete