UBB.Dev
Hopefully someone can help me out. I would like to have one category that displays on every forum summary page, so if they are just viewing one category it will still display the one "common" category and its forums at the top of the forum summary page. Hardcoded is fine. Basically I would like to display a common set of forums no matter what category they are viewing.

So, if the common category is number 1 and user was viewing ultimatebb.cgi?category=2, both categories would show up in the forum summary. If they were only displaying category 1, then of course only category 1 would be displayed.

I imagine that this wouldn't be too difficult to do, but my Perl skills are still limited and I haven't been able to figure out how to do this myself.

Can anyone help? Thanks!
Ha ha! I've figured it out. I love when I am able to figure this stuff out on my own because it means that I am learning more and more how to hack UBB.

This is what I did, in case anyone is interested:

In ubb_forum_summary.cgi changed

Code
[/code]to

[code]
If I want to change the common "shared" category, I just change the $common_cat variable. If anybody knows of a problem that might arise from doing this, please let me know. Thanks! And thanks to all who have helped in other matters. With your help I am doing a lot better on hacking UBB.

smile
YOU ROCK!!!!

I have been begging for this hack for a month now!!! Thanks alot it is GREAT!!!!!

-Jason
I did find one problem with doing this. Because of the cache files, new messages in the "shared" category won't always register in the forum summary. I got around this by hacking ubb_forum_summary.cgi and disabled caching of forum summaries. I didn't delete the lines of code. I just commented them out like this (although you could delete the whole bit of code if you wanted):

[code][/code]So far everything seems to be working fine. I am now just dealing with the different templates and trying to change the shared forum templates based on which category forum summary that they came from. This is proving to be much more difficult.
Posted By: LK Re: Display category on every forum summary page - 06/22/2002 12:15 PM
That's bad for your server, a better suggestion is to clear cache for forum summary of all categories when posting in a shared category tipsy
How do I do that? Both ubb_new_topic.cgi and ubb_new_reply.cgi have this bit of code at the end of their files:

Code
[/code]Do I change:

Code
</pre></div></div>to<br><br>[code]
Or that not the way to go?

Thanks LK!
Posted By: LK Re: Display category on every forum summary page - 06/22/2002 1:04 PM
I think you should make it:
[code][/code]
Ok. I see. Yeah, that would be better.

Thanks!
Michael J,

I am a newbie, so with LKs fix, what should I add or change?

Thanks again, my folks love this.

-Jason
Just like LK's code says. Your exact code depends on your shared forum numbers.

At the end of both ubb_new_topic.cgi and ubb_new_reply.cgi you'll find:

Code
[/code]This needs to be changed to:

[code]
Replace 'SPECIAL FORUM #' with the number of your shared forum. If you have more than one shared forum, you'll obviously have to change the code to handle more than one number, like with an 'OR' or whatever works for the number of forums you are sharing.
© UBB.Developers