vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   At least one post per day to view a specific forum? (https://vborg.vbsupport.ru/showthread.php?t=129362)

doggy1 10-17-2006 11:43 PM

At least one post per day to view a specific forum?
 
Hello. I am familiar with the promotions hack but it won't do what I am asking for.

I wanted to know if there was a way to require at least one post per day on the forum to allow access to one specific forum? For example, you have a really cool forum but you don't want lurkers in there. Also, you don't want folks post whoring to get to the required count (this is done by promotions). Instead all they need to do is post once somewhere in the forum and they get access to that specific forum. Is this possible?

Paul M 10-18-2006 12:28 AM

This is completely untested and unsupported but try this ;

Create a new plugin, linked to the global_start hook and containing this code;

PHP Code:

$xforumid 123;
$cutoff TIMENOW 86400;
$data $vbulletin->db->query_first("SELECT COUNT(*) AS posts FROM ".TABLE_PREFIX."post WHERE dateline > $cutoff AND userid = {$vbulletin->userinfo['userid']}");
if (
intval($data['posts']) == 0)
{
    
$vbulletin->userinfo['forumpermissions'][$xforumid] = 0;


Change the value of $xforumid to suit.

Note this should block that forum for anyone, even administrators, if they don't meet the requirement.

doggy1 10-18-2006 01:11 AM

Thank you so much for offering this modification to me. I have tried to install it and it seemed to be working great actually until I learned that when you clicked on any forum it actually brought you to the specified forum. We are trying to see if we can tweak it to make it not do this. If you do have a minute and you see what it wrong right away if you can let me know that would be awesome!

Thanks so much! Whether or not it works your effort is most appreciated!

Paul M 10-18-2006 02:42 AM

Ah, that'll be because I used '$forumid' - change the two instances of $forumid to $xforumid - I've edited the post.

doggy1 10-19-2006 11:07 AM

Hello. It seems to be working nicely now. Thank you so very much. Perhaps one day this will be a hack that will have additional features such as usergroup specific and the ability to change the amount of posts required per day to see the forum.

Awesome work, and thank you!


All times are GMT. The time now is 10:04 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.01104 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete