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

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

Ok this sounds great. Here we go.

In order to post replies in forum ID 13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, and 59 you need to have at least 5 new threads in the above forum id's. All you need is 5 new threads in any of the forums. You can have them spread out like 1 in each forum to equal up to 5 and that would be fine to post a reply then in the forums.

I think that would be a such a great feature. If you could do that that would be amazing.

Thanks so much Xenon
Reply With Quote
  #32  
Old 11-06-2002, 09:54 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh, i see, well here we go

PHP Code:
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)"); 
if(
in_array($threadinfo[forumid],array(13171920262733344445515258,  59 )) and $threads[counter]<5show_nopermission(); 
put this into newreply.php dircetly after:
PHP Code:
if (!$threadinfo[visible]) {
  
$idname="thread";
  eval(
"standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!
$threadinfo[open]) {
  if (!
ismoderator($threadinfo[forumid],"canopenclose")) {
    eval(
"standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
    exit;
  }

Reply With Quote
  #33  
Old 11-06-2002, 10:14 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't test it yet but how would we be able to make it so that if you don't have 5 new threads you go to an error page. Can you make it call for a template and I can write out the error message. Can you please post what I should do to do this. Thanks man so much.
Reply With Quote
  #34  
Old 11-07-2002, 12:04 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Am I suppose to run a query or something. I get this error

Fatal error: Call to undefined function: query_first() in /usr/local/psa/home/vhosts/new-dimensionz.com/httpdocs/messageboard/newreply.php on line 87

Don't I need to change some files in new thread.php as well so it insert the counter info into the wuery?
Reply With Quote
  #35  
Old 11-07-2002, 02:00 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

redo it, there was a little spelling mistak in it

the other question:
you can replace show_nopermission(); with:
PHP Code:
{
eval(
"standarderror(\"".gettemplate("error_notenoughthreads")."\");");
    exit;    

then create a template error_notenoughthreads and enter a errormessage
Reply With Quote
  #36  
Old 11-07-2002, 06:58 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way in the error message to say how many posts they need until they can post replies?

Like You have 2 posts in theses forums out of 5. You need 3 more to be able to reply.

Is there any way to do this so my members no how many more posts they need to make?

Thanks.
Reply With Quote
  #37  
Old 11-07-2002, 07:00 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well you should be able to use $threads[counter] in the template, but not sure...
Reply With Quote
  #38  
Old 11-07-2002, 10:15 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it worked thanks so much. Your the greatest.
Reply With Quote
  #39  
Old 11-08-2002, 12:05 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



glad to hear

you're welcome
Reply With Quote
  #40  
Old 11-08-2002, 07:29 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Xenon
ahh, i see, well here we go

PHP Code:
$threads=$DB_site->query_first("SELECT COUNT(*) as counter FROM thread WHERE postuserid=$bbuserinfo[userid] AND forumid IN(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59)"); 
if(
in_array($threadinfo[forumid],array(13171920262733344445515258,  59 )) and $threads[counter]<5show_nopermission(); 
put this into newreply.php dircetly after:
PHP Code:
if (!$threadinfo[visible]) {
  
$idname="thread";
  eval(
"standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!
$threadinfo[open]) {
  if (!
ismoderator($threadinfo[forumid],"canopenclose")) {
    eval(
"standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
    exit;
  }

Ok one more thing. Lol. I am sorry to ask for something else but I was just wondering.

What you did to help me out is that you need a certain amount of new threads before you can reply in those threads.

How would I go about doing something like you need 5 new threads in the forum IDS above in order to post NEW THREADS in forumid's of 21, 28, 35, 46, 53, 61

That would be the greatest. What do ya think ya can do? Tanks for everything Xenon.
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 09:07 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.04292 seconds
  • Memory Usage 2,282KB
  • Queries Executed 13 (?)
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
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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