Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Force Users to Read a Thread Details »»
Force Users to Read a Thread
Version: 2.0, by Abe1 Abe1 is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Category: Moderators Functions - Version: 3.7.x Rating:
Released: 03-04-2008 Last Update: 03-04-2008 Installs: 1468
DB Changes Uses Plugins
Additional Files  
No support by the author.

Force Users to Read a Thread 2.0


About this hack:
This hack allows you to set a thread as 'must read' by your members. Right now, if you make a post and want all your members to read it, you have no way of enforcing it. This hack will give an error message similar to the one you get when you need to change you password, saying that the admins want you to read a certain thread before they continue using the forum.

Once a user reads a thread, they wont be bugged to read it again.

You can set all usergroups or just certain onces that must read a thread.

You can set to site wide or just some forums.

Option to Force Guests

This hack added one query to every page on your forum a member goes to.
  • Files edited: 0
  • Templates edited: 0
  • Files to upload: 2 (1 via ACP, 2 via FTP)
  • Time to install: 1 minute
Updates:

Version 2.0 (03/05/08):
  • First Release of this Hack for vb3.7
  • MAJOR update. Hack totally re-writen. You must uninstall old version before upgrading.
  • Fixed just about all bugs. (like if you delete a thread...)
  • No more template edit. Everything done in ACP.
  • Permissions for by who ever has ACP access with threads and posts
  • Force Guests to read a thread now.
  • Works for BOTH vb3.6 AND vb3.7
Please post your comments or suggestions for this hack. I read ALL posts.

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

Pictures:
  • The error message.
  • The universal options.
  • Where you go to set the settings.
  • The list of forums that have force read settings.
  • The edit/add screen.

Supporters / CoAuthors

Show Your Support

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

Comments
  #352  
Old 09-11-2009, 12:16 AM
s810car s810car is offline
 
Join Date: Mar 2008
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just some friendly developer advice, you can chose to look at this and implement or not, but I would suggest either following what I did or the developer may have a better solution I didn't think of. I ran an EXPLAIN query on this SELECT query since it showed up in my slow queries log
PHP Code:
$force_thread $db->query_first("
            SELECT *
            FROM " 
TABLE_PREFIX "thread AS thread
            LEFT JOIN " 
TABLE_PREFIX "force_read_users AS force_read_users ON (thread.threadid = force_read_users.force_read_threadid AND force_read_users.force_read_userid = '".$vbulletin->userinfo['userid']."')
            WHERE thread.force_read = '1' AND (thread.force_read_expire_date = '0' OR thread.force_read_expire_date > '"
.TIMENOW."') AND ("implode(' OR '$where_usergroups) .") AND ("implode(' OR '$where_forums) .") AND force_read_users.force_read_userid IS NULL
            ORDER BY force_read_order ASC
        "
); 
Obviously I entered in some values into it to make the variables work in phpMyAdmin. Here's what i found with my relatively small forum:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE thread ALL NULL NULL NULL NULL 11877 Using where; Using filesort
1 SIMPLE force_read_users eq_ref PRIMARY PRIMARY 8 const,temp1.thread.threadid 1 Using where; Using index; Not exists

I added a index to the 'thread.force_read' row (since its boolean and a super small length) and heres the improvement

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE thread ref force_read force_read 1 const 18 Using where; Using filesort
1 SIMPLE force_read_users eq_ref PRIMARY PRIMARY 8 const,temp1.thread.threadid 1 Using where; Using index; Not exists

Should give you a MUCH more efficient query, I only have a few threads in my forum that we use the force read for (like for new rules), so I would think a site that uses this all the time with a lot more threads would see a substantial improvement

PS apologize for the terrible formatting of the exlpain query, never could line up columns easy on vbulletin
Reply With Quote
  #353  
Old 09-26-2009, 03:26 PM
socalsoccer socalsoccer is offline
 
Join Date: Aug 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

3.8.1 error XML Error: Empty document at Line 1 when importing product.
Reply With Quote
  #354  
Old 10-03-2009, 02:00 AM
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found the original message could be a little dry.
Reply With Quote
  #355  
Old 10-03-2009, 11:51 AM
Alisa Lindsay's Avatar
Alisa Lindsay Alisa Lindsay is offline
 
Join Date: Aug 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Downloaded, but not used yet. Looks like a great mod though.
Reply With Quote
  #356  
Old 10-17-2009, 04:25 AM
RomainVL RomainVL is offline
 
Join Date: Sep 2009
Location: Flanders
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DL and in use now. It works perfectly on 3.8.4
Reply With Quote
  #357  
Old 11-02-2009, 01:09 PM
griffinzx10 griffinzx10 is offline
 
Join Date: Sep 2005
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does anyone know if this will also work on version 3.8.3?
Reply With Quote
  #358  
Old 11-02-2009, 01:10 PM
griffinzx10 griffinzx10 is offline
 
Join Date: Sep 2005
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RomainVL View Post
DL and in use now. It works perfectly on 3.8.4
Quote:
Originally Posted by griffinzx10 View Post
does anyone know if this will also work on version 3.8.3?
never mind, saw the last post...
Reply With Quote
  #359  
Old 11-02-2009, 01:27 PM
griffinzx10 griffinzx10 is offline
 
Join Date: Sep 2005
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok just installed and it isnt working, when i put the info in the fields, and it says saving, the list that should show the threads i want to be viewed keeps showing as empty. Not sure what i did wrong, any help would be appreciated.
Reply With Quote
  #360  
Old 11-03-2009, 07:47 AM
griffinzx10 griffinzx10 is offline
 
Join Date: Sep 2005
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nevermind again, got it working, great hack, thanks
Reply With Quote
  #361  
Old 11-14-2009, 05:50 PM
bluej bluej is offline
 
Join Date: Jan 2007
Location: U.S.A.
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by griffinzx10 View Post
nevermind again, got it working, great hack, thanks
i am having the same problem, do you mind sharing what you did to fix it?
Reply With Quote
Reply

Thread Tools

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 04:26 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.09571 seconds
  • Memory Usage 2,313KB
  • 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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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