Previous Thread
Next Thread
Print Thread
Rate Thread
#272611 04/21/2004 3:57 PM
Joined: Mar 2004
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2004
Posts: 118
Hello to all

I have a forum in which we post only one post per thread. It is used for sell/buy/trade stuff.
Then the first admin that see's a new thread has to go to the forum and close the thread.

Here is my idea: I would like to make this locking automatic. So, when user sets the post to databse (addpost.php) I would somehow check which forum is this and if this is the forum we are doing autoLock (best option would be $config['autolock']) we send a doclosethreads.php.

A problem
doclosethreads.php can be done only by the moderator of the forum or by admin. We have a "fake" moderator that coulg be used to authenticate but dunno how.
[] if ( ($user['U_Status'] != 'Moderator') && ($user['U_Status'] != 'Administrator')){ [/]
This if statement should somehow includ another || condition something like || $config['autolock']==$Number
[] if ( (($user['U_Status'] != 'Moderator') && ($user['U_Status'] != 'Administrator')) || $config['autolock']==$Number ){ [/]
Is there another, better way to do this?


Kind regards,
PaNTerSan
Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Here is something that may be an easier alternative, allowing people to post but not reply https://www.ubbdev.com/forum/showflat...5/o/all/fpart/1

BlarC #272613 04/21/2004 9:31 PM
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Yep, that was on my board and it works fine. Make sure you also do the changes for the Quick Reply if you have this installed though. Had us confused for a while.

Sanuk!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yes, that would work just as well, another way - would be to change the status on posting in a particular forum.

in addpost.php

Find this:

$AnonName_q = addslashes($AnonName);



Above it add:
Code
<br /><br />if ($Board == 'keyword') {<br />    $PStatus_q = "C";<br />}<br />


Where I have keyword above, put the keyword of that forum. This will set the post initially to "closed" status.

BlarC #272615 04/22/2004 2:43 AM
Joined: Mar 2004
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2004
Posts: 118
Thanks []http://www.drogart.org/ubbthreads/images/graemlins/xyxthumbs.gif[/]
Muchos gracias []http://www.drogart.org/ubbthreads/images/graemlins/slayer.gif[/]

Yesturday I hardly resisted my impulse to start coding my idea



Kind regards,
PaNTerSan
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)