Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
Is there a fairly simple way to make a new thread viewable only to a certain user group for a predetermined amount of time, then after the allotted time it is made viewable to the public?

Ex: we have a for sale section, and new for sale ads would be viewable *only* to the "paid members" group for 1 week, then after 1 week it would be made *public* and everyone could see the thread/post...

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Do you want the new threads not to appear on the postlist at all, or do you want them to appear on the postlist, but once a public member clicks on it, he gets an error message?

Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
Hmmm...I would say *either* would work?

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
ok, the first option first:
in postlist.php

search for:
$limit = "LIMIT $Totalgrab";

Add underneath:
if (strpos($user[U_Groups], "-111-") === false && $Board == "boardkeyword" ){
$timeframe = time() - 7 * 86400;
$timeframe = " AND t1.B_Posted < $timeframe ";
}

search for:
AND t1.B_Sticky = '0'

Add underneath:
$timeframe


That's it. Replace 111 with the number of your subscriber group, and boardkeyword with the keyword of the board where you want to enable this.

(untested, might not work, but it should)

Joined: Mar 2000
Posts: 180
Member
Member
Offline
Joined: Mar 2000
Posts: 180
Thanks, Anno...if/when I get some free time, I'm gonna give it a shot...

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
isaac
isaac
California
Posts: 1,157
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
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 20221218)