Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 get three most recent topics for entire forum
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bax
Junior Member

141 Posts

Posted - 20 August 2002 :  05:51:25  Show Profile
OK, I haven't had a chance to get into the whole groups thing yet. Our forum is going to be a section off the main page of the site. As a teaser to get people to the forums, we want to list the three most recent topics in a box on the main page. Now before, I could simply have done something like

select top 3 * from forum_topics order by t_date desc

However, that won't necessarily work anymore, because of the whole permissions implementations. If I were to do this, I might be displaying something that really is a topic in a protected forum. How can I get the three most recent posts from ALL public forums? Does this SQL already exist in one of the scripts?

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 20 August 2002 :  05:55:18  Show Profile
I cant remember off the top of my head but there ws a database field that states what type the forum is. i.e. private etc, its was a number, I use to check that number, if it was over 0 then it was private or whatever.

That may be wrong as I'm not at my own computer and cant check what I did

It still seems to work on my web site after the upgrade as well, so I assume its the same setup

Edited by - Hamlin on 20 August 2002 05:57:23
Go to Top of Page

bax
Junior Member

141 Posts

Posted - 20 August 2002 :  06:03:23  Show Profile
In Forum_forum I see that there is f_privateForum and f_type. What is f_type here? I assume f_privateForum is 0 if public, 1 if private. However, if I just filter on this, will that work? What is f_type?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 August 2002 :  06:05:06  Show Profile  Send ruirib a Yahoo! Message
It's the F_PRIVATEFORUMS in the FORUM_FORUM table. If it's different from 0 it means the forum is not public.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

bax
Junior Member

141 Posts

Posted - 20 August 2002 :  06:05:51  Show Profile
OK, looking at db for 3.305, f_privateForums possible values are:

0 = Normal, 1 = Userlist Protection, 2 = Password Protection, 3 = Both, 4 = Members Only

Now, does that mean NO group forums will have p_privateforum = 0?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 August 2002 :  06:06:47  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by bax

In Forum_forum I see that there is f_privateForum and f_type. What is f_type here? I assume f_privateForum is 0 if public, 1 if private. However, if I just filter on this, will that work? What is f_type?



F_TYPE: 0 = Normal, 1 = URL


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

bax
Junior Member

141 Posts

Posted - 20 August 2002 :  06:13:22  Show Profile
So, something like this should do the trick then..Does this code already exist somewhere in a function that I can just call?

select top 3 ft.cat_id, ft.forum_id, ft.topic_id, ft.t_subject
from forum_topics ft
inner join forum_forum ff
on ft.forum_id = ff.forum_id
where ff.f_privateForums = 0
order by ft.t_date desc
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 August 2002 :  06:18:17  Show Profile  Send ruirib a Yahoo! Message
Yeah, that should do the trick.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07