Revised subforums implementation

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Post Reply
Verteron
Registered User
Posts: 20
Joined: Tue Aug 06, 2002 9:04 pm
Location: England
Contact:

Revised subforums implementation

Post by Verteron » Sun Nov 17, 2002 11:21 am

I like the way the new subforums implementation works with the ability to post in any subforum even if said subforum has further subforums... :? :wink:

I also like the fact that Last Post is now propagating upwards. Just wondering, how have you coded this? What happens with Last Post on the main page if the subforum is hidden to a user?

I suppose last post doesn't give much away, but a lot of boards (e.g. mine ;)) add a substring of about 30 characters to give a preview of the topic where the last post occured.

Is this hack going to be complicated by the subforums issue and privacy?

Thanks.

User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Revised subforums implementation

Post by psoTFX » Sun Nov 17, 2002 8:34 pm

To be honest the issue of users seeing a link to a post they cannot actually access is not something I'd considered. I'm not sure I see a way around it ...

I guess one way would be to not propagate the last post info to all the parents. Instead perhaps have a link next to any displayed subforum names in the "subforums" listing? Another way may be to loop through last post data for any subforums and use the relevant info for the parent ... not sure what sort of impact this would have on highly layered subforums though.

Any other suggestions ... keep in mind speed and complexity are issues here ... so no multiple table joins or anything :D
Last edited by psoTFX on Sun Nov 17, 2002 8:34 pm, edited 1 time in total.

Verteron
Registered User
Posts: 20
Joined: Tue Aug 06, 2002 9:04 pm
Location: England
Contact:

Revised subforums implementation

Post by Verteron » Mon Nov 18, 2002 9:47 pm

Hmm... I have two ideas.
  1. Simple: Add an option for forums where last post does not propagate to the parent forums. Admin-selectable by forum-id in the CP (bleh, it's a "hack" but it might work if you don't like my other suggestion...).
  2. Hard: Why not just join the row from the posts table back to the forums table... then to the auth_users table... where option_id is whatever one you've chosen to represent "can read forum" (if I'm understanding the new permissions stuff correctly, although by the looks of it perhaps you already have this information cached in user_permissions field of the users table hence in $user->data?). If the user can't read the forum, then simply display the word "Private" where the last post would otherwise appear. Yeah, it's a bit more complex, but it should be cross-db compatible.
Otherwise, why not just tell admins not to put private subforums within public root level forums if they don't want last post being shown. Would be nice to have the option.

Not to annoy either, but have you considered including post_subject or topic_title in the last post column on the index page?

On my board, I just do something like this... a couple of extra bits to the SQL query, then:

$last_post_subject = $forum_data['post_subject'] != '' ? $forum_data['post_subject'] : $forum_data['topic_title'];
$last_post_subject = strlen($last_post_subject) > 25 ? subsr($last_post_subject, 0, 22) . '...' : $last_post_subject;

Then the topic length doesn't get nasty and mess up layout. Only trouble is having to check for HTML special characters, but this can be managed by a constructive use of htmlspecialchars and str_replace.

;)

User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Revised subforums implementation

Post by psoTFX » Mon Nov 18, 2002 11:35 pm

Neither is particularly acceptable I'm afraid ... the former is an option that rather conflicts with basic permissions. The later is a potentially none too pleasant join (indeed I denormalised the forum/topic schemas to do away with the need to join to the post table for speed and "other" reasons).

Guest

Revised subforums implementation

Post by Guest » Thu Dec 05, 2002 1:53 pm

See extract below from sourceforge request tracker

[quote]Date: 2002-04-10 05:13
Sender: carpetbagger
Logged In: YES
user_id=361975

Can I add a variation on that. It would be nice to have the
following option:

Typically, you want sub-forums when a particular forum is
getting very big and needs splitting into sub-categories.
E.g. you have a 'Golf' forum and you want sub-categories
of "Tournaments", "Players", "Equipment"
etc

One problem when setting up sub-forums is that they are
quite empty to start with, and also the users have to click
on each sub-forum to see the latest forum posts or to post
in a particular sub-forum.

It would be nice if:

You click on a forum and it shows you all the latest posts
for this main forum AND all its sub-forums. You click
on "Post new topic" and there's a dropdown box that
allows
you to say whether this topic goes in a particular sub-
forum or just in the main forum.

I know not everyone would want it this way but it would be
good to have the option. Basically, when you set-up a sub-
forum you define whether you want topics for this sub-forum
to also appear in the main forum listing. Make sense?

--------------------------------------------------------------------------------

Date: 2002-04-09 15:19
Sender: dreadknot
Logged In: YES
user_id=510834

Yes, absolutely, I would love this as well. This is
incredibly helpful for things like genealogy forums, where
you might want:

U.S. Johnsons Category
- New York Johnsons Forum
- Texas Johnsons Forum
- Alabama Johnsons Forum
- Butler County Johnsons Forum
- Conecuh County Johnsons Forum
- etc.

...so that users can drill down to the appropriate level.

Maybe it's subcategories I'm looking for, but either would
do the trick.

--------------------------------------------------------------------------------

Date: 2002-04-06 05:14
Sender: dessimat0r
Logged In: YES
user_id=507642

Yes, I need this, this was present in vBulletin.

--------------------------------------------------------------------------------

Date: 2002-04-04 22:42
Sender: nobody
Logged In: NO

I would really love to see this as well[/quote]

Did that aspect of the sub forums make it into 2.2? Or will it? I would find this tremendously useful. It doesn't look like it from the current code

carpetbagger
Registered User
Posts: 20
Joined: Tue Aug 14, 2001 3:01 pm
Location: UK
Contact:

Revised subforums implementation

Post by carpetbagger » Thu Dec 05, 2002 2:18 pm

Last post was by me BTW. Got the hang of the login thing now :roll:

Post Reply