Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2002
Posts: 77
Member
Member
Offline
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!

Sponsored Links
Joined: May 2002
Posts: 77
Member
Member
Offline
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

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

Joined: Oct 2001
Posts: 60
Member
Member
Offline
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
Offline
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
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
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 tipsy

Sponsored Links
Joined: May 2002
Posts: 77
Member
Member
Offline
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
[/code]Do I change:

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

Thanks LK!

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
I think you should make it:
[code][/code]

Joined: May 2002
Posts: 77
Member
Member
Offline
Joined: May 2002
Posts: 77
Ok. I see. Yeah, that would be better.

Thanks!

Joined: Oct 2001
Posts: 60
Member
Member
Offline
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
Offline
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
[/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.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)