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

Reply
 
Thread Tools Display Modes
  #21  
Old 10-27-2002, 03:11 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks man. hope to here from ya soon.
Reply With Quote
  #22  
Old 10-28-2002, 02:44 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #23  
Old 10-28-2002, 08:04 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #24  
Old 10-29-2002, 01:45 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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(); 
Reply With Quote
  #25  
Old 10-30-2002, 07:20 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #26  
Old 10-31-2002, 10:34 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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(); 
Reply With Quote
  #27  
Old 11-02-2002, 11:20 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #28  
Old 11-02-2002, 12:49 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #29  
Old 11-02-2002, 05:01 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"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.
Reply With Quote
  #30  
Old 11-03-2002, 07:51 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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 01:10 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.04402 seconds
  • Memory Usage 2,273KB
  • 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
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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