vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Threads Limiter - Limit threads posted by user in X hours. (https://vborg.vbsupport.ru/showthread.php?t=214812)

career 09-12-2009 10:56 AM

thank you

eSe7en 09-22-2009 11:33 PM

There is a bug in this hack
It doesn't exclude the threads correctly.

I changed the 'newthread_form_start' plug-in into:

Quote:

if($vbulletin->options['nlp_limiter_active']) {
$fforums = iif(($fforums1 = unserialize($vbulletin->options['nlp_limiter_fex'])) != "", $fforums1, array());
if(!in_array($vbulletin->userinfo['usergroupid'], unserialize($vbulletin->options['nlp_limiter_ex'])) AND
!in_array($foruminfo['forumid'], $fforums)) {
$timecut = TIMENOW - (3600 * $vbulletin->options['nlp_limiter_h']);
$fforumsStr=implode(',',$fforums);
$count = $vbulletin->db->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "thread AS thread
WHERE postuserid = '{$vbulletin->userinfo['userid']}'
AND (visible != 2 && open = 1 && dateline >= $timecut) AND forumid NOT IN($fforumsStr)
");
if($count['count'] >= $vbulletin->options['nlp_limiter_threadcount']) {
$limiter = iif($count['count'] > 2, $count['count'] . ' ') . iif($count['count'] <= 2, iif($count['count'] == 1, $vbphrase['nlp_limiter_one_thread'], $vbphrase['nlp_limiter_two_thread']), $vbphrase['threads']);
eval(standard_error(fetch_error('nlp_limiter_msg', $limiter, $vbulletin->options['nlp_limiter_h'], $vbulletin->options['contactuslink'])));
exit(0);
}
}
}

career 09-23-2009 07:02 AM

Quote:

There is a bug in this hack
It doesn't exclude the threads correctly.

I changed the 'newthread_form_start' plug-in into:

if($vbulletin->options['nlp_limiter_active']) {
$fforums = iif(($fforums1 = unserialize($vbulletin->options['nlp_limiter_fex'])) != "", $fforums1, array());
if(!in_array($vbulletin->userinfo['usergroupid'], unserialize($vbulletin->options['nlp_limiter_ex'])) AND
!in_array($foruminfo['forumid'], $fforums)) {
$timecut = TIMENOW - (3600 * $vbulletin->options['nlp_limiter_h']);
$fforumsStr=implode(',',$fforums);
$count = $vbulletin->db->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "thread AS thread
WHERE postuserid = '{$vbulletin->userinfo['userid']}'
AND (visible != 2 && open = 1 && dateline >= $timecut) AND forumid NOT IN($fforumsStr)
");
if($count['count'] >= $vbulletin->options['nlp_limiter_threadcount']) {
$limiter = iif($count['count'] > 2, $count['count'] . ' ') . iif($count['count'] <= 2, iif($count['count'] == 1, $vbphrase['nlp_limiter_one_thread'], $vbphrase['nlp_limiter_two_thread']), $vbphrase['threads']);
eval(standard_error(fetch_error('nlp_limiter_msg', $limiter, $vbulletin->options['nlp_limiter_h'], $vbulletin->options['contactuslink'])));
exit(0);
}
}
}

Thanks eSe7en!

I wrote a pms to developer about this malfunction but still waiting for answer ((
Thanks a lot, my board really require this mod.

btw: checked. now with these changes working perfectly

eSe7en 09-23-2009 10:01 AM

Glad it woked :).

I've PMed the developer so that he can update the mod.
I found out about this bug as I've turned on reports and when the user send reports about any posts , they're considered as threads and subsequently not ignored by the mod.

So, if you have reports turned on; Make sure you but the reports forum in the excluded forums.

bigcurt 09-27-2009 04:10 AM

This mod would be nice to have, make things a little easier. Developer can you comment?

Silencer Groans 09-27-2009 07:41 PM

Thanks alot

ممتاز يالزعابي

career 10-20-2009 10:48 AM

Quote:

Originally Posted by eSe7en (Post 1889327)
Glad it woked :).

I've PMed the developer so that he can update the mod.
I found out about this bug as I've turned on reports and when the user send reports about any posts , they're considered as threads and subsequently not ignored by the mod.

So, if you have reports turned on; Make sure you but the reports forum in the excluded forums.

thanks!

eSe7en 10-21-2009 05:37 AM

Quote:

Originally Posted by career (Post 1902523)
thanks!

Ur Welcome :)

shofolofo 12-26-2009 04:26 PM

ese7en .. does it work with vb 4.0 ?
:p

eSe7en 12-26-2009 04:33 PM

Ok shofo, :)

I'll try to upgrade it within the next few days


All times are GMT. The time now is 01:52 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.02245 seconds
  • Memory Usage 1,740KB
  • 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
  • (4)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