Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2004, 02:42 AM
deaconxgp deaconxgp is offline
 
Join Date: Dec 2003
Location: Dallas
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Hack to block posting unless you have x # of posts?

Is there a hack or way to have a forum set so that the user must have a set # of posts in order to post in that particular forum?
Reply With Quote
  #2  
Old 01-24-2004, 07:57 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has been released. Try searching and you'll find it
Reply With Quote
  #3  
Old 01-26-2004, 12:11 PM
deaconxgp deaconxgp is offline
 
Join Date: Dec 2003
Location: Dallas
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've run a search already and there were some similar hacks but they were all for v. 2.2 . I'm running v. 2.3.4.

The similar ones I saw restricted the ability to reply to threads and not necessarily make threads....

Can you point me to the version that works with 2.3.4?
Reply With Quote
  #4  
Old 01-26-2004, 12:12 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you should be more clear


if you made a hack that did what you really wanted it to

no user could ever post ever
Reply With Quote
  #5  
Old 01-26-2004, 02:08 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He's just asking for a hack that sets a forum unaccessible unless you have a certain amount of posts.

I thought this was a standard vB feature.

All you need to do is edit newreply.php and newthread.php and find the following:

PHP Code:
verify_forum_password($foruminfo['forumid'], $foruminfo['password']); 
Then below it place a switch statement checking the users post count:

PHP Code:
switch ($foruminfo['forumid'])
{
    case 
1:  //this means if the forumid is 1
    
if ($bbuserinfo['posts'] < $certain_amount_of_posts)
    {
       
print_no_permission();
    }

Just change the $certain_amount_of_posts to a shorter variable containing the post count.
You can check more forums by just adding more cases to the switch.
Reply With Quote
  #6  
Old 01-26-2004, 04:42 PM
deaconxgp deaconxgp is offline
 
Join Date: Dec 2003
Location: Dallas
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks V!! that's exactly what I'm talking about dude!! THANKS...but i don't know much about variables so what variable do i put in there to replace $certain_amount_of_posts? do i just add a # there?
Reply With Quote
  #7  
Old 01-26-2004, 08:58 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. Here is an example, with 3 forums:

Code:
switch ($foruminfo['forumid']) 
{ 
    case 43:  // this is the forum id
    if ($bbuserinfo['posts'] < 50)  // if the users post count is less than 50 posts 
    { 
       print_no_permission(); // print a no permissions error
    }

     break;  // this is needed for all cases in a switch except the last

    case 23:  // this is the forum id
    if ($bbuserinfo['posts'] < 70)  // if the users post count is less than 70 posts 
    { 
       print_no_permission(); // print a no permissions error
    }

     break;

    case 5:  // this is the forum id
    if ($bbuserinfo['posts'] < 150)  // if the users post count is less than 150 posts 
    { 
       print_no_permission(); // print a no permissions error
    }
}
Reply With Quote
  #8  
Old 01-27-2004, 12:41 PM
deaconxgp deaconxgp is offline
 
Join Date: Dec 2003
Location: Dallas
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

marvelous!!! i'm gonna test that out right now.
Reply With Quote
  #9  
Old 01-27-2004, 12:44 PM
deaconxgp deaconxgp is offline
 
Join Date: Dec 2003
Location: Dallas
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

one last thing...can i edit what the no permission page says through the templates in the admin cp somehow?
Reply With Quote
  #10  
Old 01-27-2004, 12:50 PM
deaconxgp deaconxgp is offline
 
Join Date: Dec 2003
Location: Dallas
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
PLEASE DO NOT ATTACH/PASTE WHOLE vB FILES
I couldn't find the line you said look for ....this is my newthread.php where would I place the switch?
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 04:47 PM.


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.04240 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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