vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   limited forum threads (https://vborg.vbsupport.ru/showthread.php?t=46675)

Smalley 12-14-2002 08:30 PM

limited forum threads
 
there is any hack can limit the users to do not add more than the threads which the admin wants ??

like in fourmid==2 it is for 50 threads only no more thread can be added unless the admin increase the limit for this specific forum?

Xenon 12-14-2002 08:48 PM

hmm, there is no hack out, and i didn't see the sense of it, but i can be done with one edit of newthread.php:

after that:
PHP Code:

$permissions=getpermissions($forumid);
if (!
$permissions[canview] or !$permissions[canpostnew]) {
  
show_nopermission();


add that:
PHP Code:

if (in_array($forumid,array(2,3,4))) {
  
$threadcount=$DB_site->query_first("SELECT COUNT(*) AS count FROM thread WHERE forumid=$forumid");
  if(
$threadcount[count]>=50show_nopermission();



Smalley 12-14-2002 09:42 PM

when i place it ,, i face this error ..

Fatal error: Call to undefined function: array() in /home/arabms/public_html/vb/newthread.php on line 42

Smalley 12-14-2002 09:43 PM

and if i want it for multiple forums can i ??

Xenon 12-14-2002 10:17 PM

yap, sorry, typing error ;)

i've edited the post, now it'll work for the forumid's 2,3,4 :)

Smalley 12-14-2002 10:36 PM

man it still gives me error

Parse error: parse error, unexpected '{' in /home/arabms/public_html/vb/newthread.php on line 40

and how about if i repate the line to control diffirent forum for diffirent number of threds it will work ?

Smalley 12-15-2002 07:19 AM

any help for this issue ?

Smalley 12-15-2002 11:42 AM

it is still not works

Xenon 12-15-2002 11:46 AM

there is no need for 2 bumps after less than half of a day....

hav corrected it, i've forgotten an )

Smalley 12-15-2002 01:58 PM

its working fine Thanks alot ,,

if i want it to be for different fourm in different number of threads should i repeat the line or there is another way to have this ?


All times are GMT. The time now is 05:36 PM.

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.01037 seconds
  • Memory Usage 1,733KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete