Welcome, Guest. Please Login or Register.
November 30, 2024, 12:36:27 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [CODE] Restrict Number of Threads Per Person on a Board « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [CODE] Restrict Number of Threads Per Person on a Board  (Read 4982 times)
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
[CODE] Restrict Number of Threads Per Person on a Board
« on: February 09, 2003, 08:34:37 PM »
Reply with quote

I have a board where we limit each person to one thread so I wrote a little code to do this for us.

Modify Post.php find
if ($newtopic)        // This is a new topic. Save it.
   {


Add After for each board you wish to restrict, text in bold means you need to fill in a value

//board name thread restriction
if($board == board id number && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator')
      {
          $request = mysql_query("SELECT COUNT(*) FROM {$db_prefix}topics WHERE ID_BOARD=board id number && ID_MEMBER_STARTED=$ID_MEMBER");
         $row = mysql_fetch_row($request);
         if($row[0] >= 1)
                  fatal_error('You are limited to one thread on this board.  If you need another talk to an administrator.');
      }
Logged

Galt
Jr. Member
**
Posts: 68


I am NOT a llama!

WWW
Re:[CODE] Restrict Number of Threads Per Person on a Board
« Reply #1 on: February 11, 2003, 04:52:32 AM »
Reply with quote

I'm just curious.  Why would you want to do that?
Logged

David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[CODE] Restrict Number of Threads Per Person on a Board
« Reply #2 on: February 11, 2003, 05:00:43 AM »
Reply with quote

Quote from: Galt on February 11, 2003, 04:52:32 AM
I'm just curious.  Why would you want to do that?
We have a "promote your board" board where we limit each member to one thread.
Logged

Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[CODE] Restrict Number of Threads Per Person on a Board
« Reply #3 on: February 11, 2003, 08:04:09 PM »
Reply with quote

What version is this for?
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[CODE] Restrict Number of Threads Per Person on a Board
« Reply #4 on: February 11, 2003, 11:33:38 PM »
Reply with quote

In theory, this would work with 1.4.0 to 1.5.1.... at least, so it looks.

-[Unknown]
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[CODE] Restrict Number of Threads Per Person on a Board
« Reply #5 on: February 12, 2003, 04:11:44 AM »
Reply with quote

Quote from: Wiziwig on February 11, 2003, 08:04:09 PM
What version is this for?
Originally wrote it for 1.4.1 but it took no changes to 1.5.1.  I would assume it even works as far back as 1.3 or 1.1 since posting code really has not dramitically changes.
Logged

edi67
Jr. Member
**
Posts: 97


I'm a llama!

Re:[code] Restrict Number of Threads Per Person on a Board
« Reply #6 on: November 23, 2003, 07:44:20 AM »
Reply with quote

i triyng to use this modify in my board but i need one explain .

what i must make for this value ? "board id number "

where i can find number id board?
Logged

Lamper
Noobie
*
Posts: 5


ICQ - 173261418tomerdean516@hotmail.com WWW
Re:[code] Restrict Number of Threads Per Person on a Board
« Reply #7 on: January 04, 2004, 01:54:36 PM »
Reply with quote

When you enter the board you will see in the URL

boardid=(NUMBER)
Logged
Spark_of_Ice
Noobie
*
Posts: 32


I'm a llama!

Re:[code] Restrict Number of Threads Per Person on a Board
« Reply #8 on: January 06, 2004, 01:24:19 AM »
Reply with quote

Can an Admin or moderator bypass this code?

[EDIT]
Erh nvm, I looked at the code.
« Last Edit: January 06, 2004, 01:24:45 AM by Spark_of_Ice » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [CODE] Restrict Number of Threads Per Person on a Board « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.154 seconds with 21 queries.