|
|
Joined: May 2002
Posts: 77
Member
|
Member
Joined: May 2002
Posts: 77 |
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!
|
|
|
|
Joined: May 2002
Posts: 77
Member
|
Member
Joined: May 2002
Posts: 77 |
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 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.
|
|
|
|
Joined: Oct 2001
Posts: 60
Member
|
Member
Joined: Oct 2001
Posts: 60 |
YOU ROCK!!!!
I have been begging for this hack for a month now!!! Thanks alot it is GREAT!!!!!
-Jason
|
|
|
|
Joined: May 2002
Posts: 77
Member
|
Member
Joined: May 2002
Posts: 77 |
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.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
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
|
|
|
|
Joined: May 2002
Posts: 77
Member
|
Member
Joined: May 2002
Posts: 77 |
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]Do I change:
</pre></div></div>to<br><br>[code] Or that not the way to go?
Thanks LK!
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
I think you should make it: [code][/code]
|
|
|
|
Joined: May 2002
Posts: 77
Member
|
Member
Joined: May 2002
Posts: 77 |
Ok. I see. Yeah, that would be better.
Thanks!
|
|
|
|
Joined: Oct 2001
Posts: 60
Member
|
Member
Joined: Oct 2001
Posts: 60 |
Michael J,
I am a newbie, so with LKs fix, what should I add or change?
Thanks again, my folks love this.
-Jason
|
|
|
|
Joined: May 2002
Posts: 77
Member
|
Member
Joined: May 2002
Posts: 77 |
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]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.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|