Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2004, 06:31 PM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Any way to sort a list of forums by activity?

I'm going to have a large number of forums for music artists/groups, and I'd like to be able to sort them by activity. Here's what the layout witll look like:

Artists
--A
----A Perfect Circle
----AFI
----Aerosmith
----Amos, Tori
----etc.
--B
----Barenaked Ladies
----Britney Spears
----etc.
--C
----Chemical Brothers
----Coldplay
----etc.

There will be threads in all of the individual artist forums that users create. I would like to be able to sort the forum list itself by activity....so that when someone posts in the Britney Spears forum, it will pop it up to the top of the list that you see when you click on "B" in the Artists category. Just like the way the threads inside a forum behave, except that it's with sub-forums within a forum.

Is there ANY way to do this, or am I SOL?

thanks....
Reply With Quote
  #2  
Old 08-04-2004, 06:40 PM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can do this with mod's if you do not mind that they will always look that way. It's also a fair amount of mandraulic work.

Define the letters as categories. Then, for each real forum, set the display order so that there is, say, 25 between each one. That way, you leave room between any two forums to insert new ones in the right order. Example:

A Perfect Circle = 25
AFI = 50
Aerosmith = 75

and so on.
Reply With Quote
  #3  
Old 08-04-2004, 07:22 PM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you may have answered a different question than I asked....I probably didn't type it out clearly enough (I've been puzzling over this for a while).

I have Artists created as a category. I also have A, B, C, etc created as categories. I'm now adding the forums for individual artists, so that when you click on the A category, you'll see:

A Perfect Circle
AFI
Aerosmith
Amos, Tori
all the other A groups

I've scripted the creation of all the artist forums in the DB so I don't have to do it all by hand.

What I'd like to be able to set up is a sort so that when someone makes a post in the Amos, Tori forum, the list of forums in the A category will appear like this:
Amos, Tori
A Perfect Circle
AFI
Aerosmith
all the other A groups

....and then the forums list will keep updating based on posts in the forum, just like the threads list does. When you make a post in a thread on page 4 of a forum, it will come to page 1. I'd like to make it so that if you make a post in an artist's forum on page 3 of the artist list, it will come to the top of the artist forums list.

Does that make sense at all, or have I been staring at the computer for too long?
Reply With Quote
  #4  
Old 08-05-2004, 03:59 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would have to modify the behavior of index.php to accomplish this. The delivered index.php just list them in the display order defined in AdminCP, with no option to change that behavior.

The order used in index.php comes from the array $iforumcache, which is built in the function cache_ordered_forums (you will see that call in index.php) by walking the unordered $forumcache. Each entry in $forumcache is assigned to $iforumcache as follows (stylized, not real PHP):

$iforumcache[PARENTID][DISPLAYORDER][FORUMID] = FORUM_FROM_FORUMCACHE

So, you could build the $iforumcache for index.php using your sort order, changing the DISPLAYORDER level to reflect an order based on recent activity, the 'lastpost' time stamp field from the 'forum' table.
Reply With Quote
  #5  
Old 08-05-2004, 11:30 AM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very cool, I'll take a look into that.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09926 seconds
  • Memory Usage 2,199KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete