vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Prevent Post More Than 1 post in thread before X posts (https://vborg.vbsupport.ru/showthread.php?t=110228)

Developer 03-12-2006 10:00 PM

Prevent Post More Than 1 post in thread before X posts
 
Prevent Post More Than 1 post in thread before X posts
Initial
Description::.
This hack prevent users(not moderators or admin)from posting More Than 1 post in thread before X posts(this hack is very useful if u r using Can't Use Private Messages Before X posts OR Can't Download Attachment Before X posts)
Hack Features::.
1-easy yo install
[See Screen Shots]

Installation::.
1-Import The product.
2.Click install
History::.
1.0.0 On 13. Mar 2006 Initial Version.
1.0.2 On 13. Mar 2006 fix the code [by Trigunflame(thnx)] and added feature to allow to thread starter to post with out getting the error message.
Hack Languages::.
  • English
Details::.
1 plugin, 3 phrases, 0 templates, 0 option, 1 query[reading]
Donation::.
Feel Free To https://vborg.vbsupport.ru/external/2010/09/1.gif
aT lAsT::.
IF YOu lIkE iT cLIcK INSTALL
vbulletin.orghttps://vborg.vbsupport.ru/

Support Given For Who Clicked Install {ONLY}

Trigunflame 03-13-2006 10:07 AM

Couldnt this be done just using template conditionals in quick reply & newpost? Your product xml isnt attached :)

Developer 03-13-2006 10:12 AM

Quote:

Originally Posted by Trigunflame
Couldnt this be done just using template conditionals in quick reply & newpost? Your product xml isnt attached :)

mmm i don't think so :surprised:
_______________
attached.

Trigunflame 03-13-2006 10:13 AM

Quote:

Originally Posted by Developer
mmm i don't think so :surprised:
_______________
attached.

O.. i have nothing to do -__-, i'll play around with it and see.. brb.

Developer 03-13-2006 10:14 AM

Quote:

Originally Posted by Trigunflame
O.. i have nothing to do -__-, i'll play around with it and see.. brb.

TyT
and let me now the final result:)

Trigunflame 03-13-2006 11:15 AM

Currently your plugin code doesnt check the $useridpost nor use the right logic operator resulting in not letting anyone post if their Global post count is below the option; regardless if they have posted in the specified thread or not.

Here, replace your plugin code in the XML file with this.

PHP Code:

//Developer
//edited by trigunflame
$useridpost $db->query_first("SELECT userid from " TABLE_PREFIX "post where threadid = '" $threadinfo['threadid'] . "' AND userid=" $vbulletin->userinfo['userid']);
if(
$vbulletin->userinfo['posts'] < $vbulletin->options['oldpt_po'] && $vbulletin->userinfo['userid'] == $useridpost['userid'] && can_moderate($forumid'canremoveposts') == false)
{
    
standard_error(fetch_error('oldpt_error'$vbulletin->options['oldpt_po']));
}
//Developer 


Developer 03-13-2006 12:27 PM

Quote:

Originally Posted by Trigunflame
Currently your plugin code doesnt check the $useridpost nor use the right logic operator resulting in not letting anyone post if their Global post count is below the option; regardless if they have posted in the specified thread or not.

Here, replace your plugin code in the XML file with this.

PHP Code:

//Developer
//edited by trigunflame
$useridpost $db->query_first("SELECT userid from " TABLE_PREFIX "post where threadid = '" $threadinfo['threadid'] . "' AND userid=" $vbulletin->userinfo['userid'] . "");
if(
$vbulletin->userinfo['posts'] < $vbulletin->options['oldpt_po'] && $vbulletin->userinfo['userid'] == $useridpost['userid'] && can_moderate($forumid'canremoveposts') == false)
{
    
standard_error(fetch_error('oldpt_error'$vbulletin->options['oldpt_po']));
}
//Developer 


ooops this is the testing XML :confused:
anyway fixed and thnx 4u

PabloAM 03-13-2006 12:38 PM

:s Not Product For Download??? :s

PabloAM 03-13-2006 01:09 PM

ERROR :

XML Error: not well-formed (invalid token) at Line 24


:(:(:confused:

Developer 03-13-2006 01:28 PM

try it now


All times are GMT. The time now is 08:17 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.02227 seconds
  • Memory Usage 1,762KB
  • 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
  • (4)bbcode_quote_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