The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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.... |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
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? |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Very cool, I'll take a look into that.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|