vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Number Of Posts Needed To Reply to a Thread In Certain Forums (https://vborg.vbsupport.ru/showthread.php?t=44556)

BigJohnson 10-27-2002 03:11 PM

thanks man. hope to here from ya soon.

Xenon 10-28-2002 02:44 PM

well the thread version is not so easy, because there is no threadcounter in the usertable

you need to run this query:
PHP Code:

$threads=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid]"); 

then you can use $threads[counter] within you ifconditions

BigJohnson 10-28-2002 08:04 PM

So how would this look exactly. I am not to good with php. Do you think you can please tell me what to do maybe. Thanks Xenon

Xenon 10-29-2002 01:45 PM

well instead of this:
PHP Code:

if($threadinfo[forumid]==and $bbuserinfo[posts]<yshow_nopermission

you have to put in this now:
PHP Code:

$threads=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid]");
if(
$threadinfo[forumid]==and $threads[counter]<yshow_nopermission(); 


BigJohnson 10-30-2002 07:20 PM

PHP Code:

$threads=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid]");
if(
$threadinfo[forumid]==and $threads[counter]<yshow_nopermission(); 

Do u think u can make directions on where i have to place these bits and pieces of code in the php files. I don't know what to do at all. I no how to run queries i just dont no where ot place all these code.

The hack need to be made so they need a certain amount of threads in certain forums before they can reply in other forums.


Say I have

FORUM1
FORUM2
FORUM3
FORUM4

In order to reply to a thread in FORUM3 you need a certain amount of NEW THREADS in FORUM2 and FORUM3.

That is example but I choose the forumids i need the have the new threads added to and the forum ids of the forums that need the certain amount of new threads before you can reply to as well. Please help me out. I hope you understand because some times i confuse myself hehehe. Thanks Xenon ur the greatest for helping me out so far.

Xenon 10-31-2002 10:34 AM

well all the code belongs to newreply.php

after this:
PHP Code:

if (!$threadinfo[open]) {
  if (!
ismoderator($threadinfo[forumid],"canopenclose")) {
    eval(
"standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
    exit;
  }


add this:
PHP Code:

$threads1=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid=x"); //For example Forum2
$threads2=$DB_site-query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid=y");  // For example Forum3
if($threadinfo[forumid]==and $threads1[counter]<and $threads2[counter]<yshow_nopermission(); 


BigJohnson 11-02-2002 11:20 AM

What do i actually plug into here?

if($threadinfo[forumid]==x

Also don't you need code in the newthread.php as well to put the certain amount of new threads in that new database query we ran earlier?

For

if($threadinfo[forumid]==x

Dont i need to put more than one number in this area of x? If I do How do i separate each number?

Xenon 11-02-2002 12:49 PM

why to newthread?
you said just replying needs an special ammount of threads already stared....

Quote:

What do i actually plug into here?

if($threadinfo[forumid]==x
well, the forumid of the forum you want a user to be able to reply only if he has a certain ammount of threads created already

BigJohnson 11-02-2002 05:01 PM

"you said just replying needs a special amount of threads already started"

No. lol. What I need is that you need a certain amount of new threads in certain forums before you can make replies in certain forums.

I hope u can still help me out. Sorry to make it so confusing. lol. Thank you Xenon.

Xenon 11-03-2002 07:51 PM

well, can you tell me the exact way you want it?

so say you need 5 threads in forumid 4 and 7 threads in forumid 6 to reply to a thread in forumid 1...

then i can code it the exact way you want it ;)


All times are GMT. The time now is 01:10 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.02253 seconds
  • Memory Usage 1,756KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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