vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Limit number of threads in a Forum for a Usergroup (https://vborg.vbsupport.ru/showthread.php?t=74800)

Marco van Herwaarden 01-20-2005 10:00 PM

Limit number of threads in a Forum for a Usergroup
 
Maximum Threads per Forum - Version 1.01

Description
With this mini-mod it is possible to limit the number of threads a user can make in certain forums. Optional only the number of posts made in the previous x days count for this maximum.

This hack was written based on a request made here previously: https://vborg.vbsupport.ru/showthread.php?t=74670

Tested on
- vB 3.0.6 (Will probably also work on earlier 3.0.x versions)

Install Information
Installation using HIS installer included (HIS by Link14716 https://vborg.vbsupport.ru/showthrea...staller+system)
Uninstaller included
Install time: 3 minutes, easy
File edits: 1
Template edits: 0

Features
- Multiple UsergroupId's can be set that should be limited.
- Multiple ForumId's can be set. Max number of threads is counted for every forum seperate.
- Optional the number of threads to limit to can be set, default is 1.
- Optional the time frame in days, in which to count previous threads can be set. Default is no timelimit.

Known limitations
- Secondary (member) Usergroups are not taken in account.

Support
Support will be given in this thread or on www.vbulletin.nl

History
Version 1.01:
- Phrases replaced by Settings
- HIS Installer included

Additional Info
I will not charge for this hack. But if you like it and are looking for a way to spend your money, paypal donations are always welcome (marcoh64@msn.com) ;)

Please click Install if you are using this hack

nexialys 01-21-2005 12:21 PM

hum.. strange:

phrases are for text
settings are for settings...

so why did you create 4 settings in phrase variables ?!

there is a protocol here that help you create new setting groups, and then create some settings in it.... would be more efficient to do so... a simple sql query to create all this in a simple install file, or the query itself,..

for now, this hack is really strange...

Marco van Herwaarden 01-21-2005 12:27 PM

Well you're right. This should go into settings. Being this a mini-mod on request, i didn't want to spend time to put together the installer.

But you're right, better do it the proper way.

Since nobody have installed it yet, i will remove the file for now and replace it later today with a version that uses settings.

Marco van Herwaarden 01-21-2005 02:00 PM

New version 1.01 Uploaded.

Installation now through HIS.

Phrases replace by a new Settingroup (groupid 6410) called 'Limit number of Threads in Forum'.

nexialys 01-21-2005 04:55 PM

ah, now this is good... ;) (cheers MarcoH64!)

i would recommend this hack to anybody that have a forum that is based on clients applyances or services requests... ;)

hockyfan 01-21-2005 07:19 PM

Just to be sure I'm clear on this one, I can set a limit, so each day a user can only make X amount of threads in a forum? And this will "reset", every day?

h

Marco van Herwaarden 01-21-2005 08:05 PM

Well it is still a bit limited. But the request was limited.

If there are people asking for it, settings could be per forum i think (diffirent usergroups/limits per forum).

bigcurt 01-22-2005 01:28 AM

Hello, thank you SOOOOOOOOO Much for releasing this hack...I have a problem though :(. I put the files in install...then when I go to it and try to install this pops up.

Code:

Warning: main(./install/his_files/hackfunctions_b3.php): failed to open stream: No such file or directory in /install_/his_files/hack_install_b3.php on line 34

Fatal error: main(): Failed opening required './install/his_files/hackfunctions_b3.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bigcurt/public_html/forum/install_/his_files/hack_install_b3.php on line 34

Any suggestions? I dont have the HIS system...but I dont go to his folder I just go to hack_install.

hmm??

Marco van Herwaarden 01-22-2005 08:09 AM

Rename your install directory back from 'install_' to 'install'

PS The HIS files are packaged in the zip.

bigcurt 01-22-2005 08:48 PM

Hello, ok I have installed it but it doesnt work :(. I got 3 of my members to try and make a new thread and they tried 3 times and all 3 it popped up :( :( any suggestions...is it workin for anyone else?

Marco van Herwaarden 01-22-2005 10:20 PM

It will only work if settings in your ACP are correct:
- It will only work on the forums for which the forumid is in the list of id's in the vBuletin Settings for this hack
- AND the user have a primary usergroup that is in the settings for this hack.

bigcurt 01-22-2005 10:45 PM

I am pretty sure I have all that right

Marco van Herwaarden 01-23-2005 08:01 AM

Can you give me a screenprint of your settingspage.

bigcurt 01-24-2005 02:10 AM

Yep sure can. here ya go.

https://vborg.vbsupport.ru/external/2005/02/4.jpg

I have registered users, mods, admin all them to where those are thr groups it will limit...idk what the problem is :( :( I really would like this to work.. would it have anythind to do with the fact I am still using 3.03?

Marco van Herwaarden 01-24-2005 03:50 AM

Sorry but i can't see the usergroups in the image you posted.

Forum 5 is the real forum where posting, or a category that holds the forums you want to limit?

PS Tried to get you on MSN a few times, but you didn't respond.

Marco van Herwaarden 02-04-2005 03:13 PM

Quote:

Originally Posted by bigcurt8998
Yep sure can. here ya go.

http://img181.exs.cx/img181/8189/untitled7np.th.jpg

I have registered users, mods, admin all them to where those are thr groups it will limit...idk what the problem is :( :( I really would like this to work.. would it have anythind to do with the fact I am still using 3.03?

Is this already fixed?

MP3 02-09-2005 04:50 AM

This one controls the number of new threads :)...

How about also controlling the number of new replays on the old threads?

bigcurt 03-06-2005 02:57 AM

I still have not resolved this problem :(

Marco van Herwaarden 03-06-2005 07:57 AM

Give me a pm about it on monday and i will try to have alook.

Marco van Herwaarden 03-12-2005 07:26 PM

Just so others will not think there is a problem with this hack: the problem of BigCurt is solved. He didn't make the file edit.

007 04-08-2005 12:12 AM

Hey the installer brings up SQL errors. Does this work on 3.07?

Marco van Herwaarden 04-08-2005 06:15 AM

Quote:

Originally Posted by 006
Hey the installer brings up SQL errors. Does this work on 3.07?

Yes it should work on 3.0.7.
Could you be a bit more specific about the error?
PS No database changes made by the installer, only some settings/phrases inserted IIRC

007 04-10-2005 05:47 PM

Here is what I get on 3.07:

Code:

Hack Installer System
Limit Number of Threads in Forum


templates.php (Save This File)
<?php

// Templates

Warning: Invalid argument supplied for foreach() in /his_files/hack_creator_b2.php on line 160
?>

phrases.php (Save This File)
<?php

// Phrases
Warning: Invalid argument supplied for foreach() in /his_files/hack_creator_b2.php on line 202
?>


Warning: halt(./includes/functions_log_error.php): failed to open stream: No such file or directory in .../includes/db_mysql.php on line 389

Warning: halt(): Failed opening './includes/functions_log_error.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in .../includes/db_mysql.php on line 389

 

There seems to have been a slight problem with the AuctionSightings.com database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 3.0.7:

Invalid SQL: SELECT varname, text FROM phrase WHERE varname IN () ORDER BY languageid DESC
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY languageid DESC' at line 1

mysql error number: 1064

\

Any ideas? I would love to use this hack. Thanks!

boeserwolf 04-10-2005 06:11 PM

Hallo


Would you mind if I would translate your hack into german??

2.) Would it be okay for you if I would post the translation then at www.vbhacks-germany.com ??

Only licensed users may download hacks in this community.


If this is not okay for you, I will post the translation here.


Yours


Markus

Marco van Herwaarden 04-10-2005 06:15 PM

@006
You selected "Generate Files" on the installer screen? That is only for developing a hack, not for installing.

Marco van Herwaarden 04-10-2005 06:16 PM

Quote:

Originally Posted by boeserwolf
Hallo


Would you mind if I would translate your hack into german??

2.) Would it be okay for you if I would post the translation then at www.vbhacks-germany.com ??

Only licensed users may download hacks in this community.


If this is not okay for you, I will post the translation here.


Yours


Markus

Yes i do mind at this time. You can ask me again in 1 month time using PM.

007 04-10-2005 07:39 PM

Oh sorry Marco! I thought I needed to select that. Will try it again now. Thanks!

That worked. I have an idea for future versions.

Instead of having this be setting based, it would be much better if it was forum permission based.

That way each forum could have individual maxes set, with individual error messages (entered through a field), and would be specific to usergroups.

That would be a lot harder, but also a lot cooler!

It's awesome now though, don't get me wrong. Only thing is there are some other forums I'd want to limit too, but not the same amount.

Marco van Herwaarden 04-22-2005 05:57 AM

Quote:

Originally Posted by 007
Oh sorry Marco! I thought I needed to select that. Will try it again now. Thanks!

That worked. I have an idea for future versions.

Instead of having this be setting based, it would be much better if it was forum permission based.

That way each forum could have individual maxes set, with individual error messages (entered through a field), and would be specific to usergroups.

That would be a lot harder, but also a lot cooler!

It's awesome now though, don't get me wrong. Only thing is there are some other forums I'd want to limit too, but not the same amount.

I will think about this for a future version. Maybe it would be even a seperate hack or a Lite and a Full version.

The reason for this is that I think the strenght of the current hack is it's simplicity. Adding settings per forum, would make the hack much more complicated (not a real problem), and much more important it would require many more file edits. So a Lite version like it is now (maybe add maximum replies), and a full version with forum based settings.

pipin 05-13-2005 02:06 PM

Im wondering if this hack could be used as a basis to write a "Limit number of posts in Thread (depending on forumid)" hack.

Marco van Herwaarden 05-13-2005 03:50 PM

Yes it could with some tweaking. But i don't have the time right now to look into it.

DougM 05-26-2005 02:34 AM

This is exactly what I have been looking for. Thank you. I do have one question:

Does this limit threads within a 24-hour day or calendar day?

EDIT: After installing I realized this won't quite do what I need. Perhaps a small modification can do this?

I wish to limit all new threads in all forums to one per day with the exception of my Help & Support forum. Is there a simple way to limit posts in all specified forums to X number per day? Currently members can still post one thread in each forum.

Thank you.

Marco van Herwaarden 05-26-2005 04:52 AM

If i understand you correct you want only 1 thread/24 hours in any forum except your support forum?

DougM 05-26-2005 11:40 AM

Yep, that's right Marco.

The site I'm building allows members to advertise services, hence the limit of one per day in all forums except the support forum. I don't think they'll ask for help if it means using up their one post per day.

Thanks

SilverBoy 07-01-2005 01:04 PM

thank u for this great hack,

I have a Q before install ot, I want to limit new threads in all my forums to 3 threads on a day, (f2 --> 3 new threads, f5 --> 3 new threads, ....)

but I want in 3 or 4 forums the limitation number to be 1, is this hack can deal with this? because when I saw a picture in this thread I thought this hack can appliying only one limitation number.

thank u

Marco van Herwaarden 07-01-2005 02:05 PM

No you can not set a different limit for each forum

SilverBoy 07-01-2005 05:17 PM

so, can u modified it?

Marco van Herwaarden 07-01-2005 08:14 PM

That would be a major modification to this hack. It would involve setting a limit per forum/usergroup i guess.

I could make it for a small fee.

Marco van Herwaarden 07-01-2005 08:17 PM

PS You can also have a look here: https://vborg.vbsupport.ru/showthread.php?t=81584

xlguy 10-20-2006 03:35 PM

Any chance of a 3.5/3.6 port? :D

punchbowl 12-07-2006 09:02 AM

Quote:

Originally Posted by xlguy (Post 1100857)
Any chance of a 3.5/3.6 port? :D

would be ideal - pleeeeeeaaase


All times are GMT. The time now is 02:05 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.01408 seconds
  • Memory Usage 1,821KB
  • 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_code_printable
  • (5)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
  • (40)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