Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Modification Name: Category Descriptions

Author(s): Weird Al

Description: Allows you to add a description right under the category name on the forum summary. Looks just like the 6.7 version.

Demo: none

Requirements: 6.6.x

Download Link: https://www.ubbdev.com/ubb/upload/00020028/CategoryDescription6.6.txt

Credits: Charles did all the hard work, I just added CP support.

Instructions / Other Info: I was looking through the templates and noticed some code that look out of place, looking into it, the spot for category descriptions are already in 6.6.x code, and it still is. You can open vars_cats.cgi and add the desciption there, but I felt a cp interface would be good.


When you go to the Category page in the CP, there will be a new text input box for you to add a description. ubbcode works, graemlins do not, img code works, so does html. If you want to add a line break, use html.

Remember to clear your summary cache when you change the description.

Sponsored Links
Joined: Nov 2001
Posts: 1,704
CTM Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
You have no idea how long I've been trying to do this... I was about to release it as a mod for 6.5 too frown

But I guess you beat me to it... Nice work Al/Charles, installing now smile

(Suggestion for future version: Making the UBB automatically waste the cache after updating category descriptions? ubb_lib, &ClearSummaryCache... Just a thought smile )

Joined: Sep 2001
Posts: 93
Member
Member
Offline
Joined: Sep 2001
Posts: 93
i got this in cp after installing on 6.6.1

Quote
quote:
Undefined subroutine &main::prep_for_edit called at /home/www/web1/html/ubb/Templates/cp2_categories.pl line 177.

ยป Please use your back button to return.

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
doh, forgot one step

In cp2_categories.pl

FIND:
Code
	return qw(cp2_forums);
REPLACE WITH:
Code
	return qw(cp2_forums ubb_lib_posting);
I'll update the txt now


TXT updates

Joined: Sep 2001
Posts: 93
Member
Member
Offline
Joined: Sep 2001
Posts: 93
now it works wink

is html possible ? seems like yes and not cause some tag work and some not

Sponsored Links
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
If you enabled html in a post, that's the html that would work. javascript etc isn't allowed

Joined: Nov 2001
Posts: 1,704
CTM Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Okay, easy instruction for lazy people (like me tipsy ) who want to automatically clear the cache after updating the descriptions.

Find:

Code
$in{returnpage} = "categories";
Add after:

Code
&ClearSummaryCache;

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
yeah, I was assuming that changing the name of a category also cleared the summary cache, so I left that out. Thanks for the code, how's it working for you?

Joined: Nov 2001
Posts: 1,704
CTM Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Better than ever... Categories look so much better now laugh

Thanks Al smile

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Added this to my main boards, so the new demo is at http://www.alforadmin.com

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
Morgan 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)