Previous Thread
Next Thread
Print Thread
Rate Thread
#320591 09/12/2014 12:10 AM
Joined: Jan 2000
Posts: 5,834
Likes: 20
UBBDev Owner
Time Lord
UBBDev Owner
Time Lord
Joined: Jan 2000
Posts: 5,834
Likes: 20
Author: Gizmo/Gremelin (James of VNC Web Design)

Requirements:
Valid UBB.Threads install and license.

About:
This quick modification will "highlight" your subforums, just like we have here at UBB.Dev.


New Image (place in your "general" image folders):
https://www.ubbdev.com/forums/images/general/default/subforum.png - Provided by our good friend id242.

The Modification
Add the following to your style (CP -> Display Options -> Styles -> Edit Style, Extra Properties):
Code
.subforum {
background: #E9ECF2;
border: 1px solid #708097;
-moz-border-radius: 4px;
border-radius: 4px;
display: inline;
padding-left: 2px;
padding-right: 2px;
white-space: nowrap;
}
.subforum a {
text-decoration: none;
}

In libs/functions_forums.inc.php:
Find:
Code
				$returndata[$i]['subforum_links']["$sub_id"][0] = sprintf('<a href="%s">%s</a>', make_ubb_url("ubb=postlist&Board=$sub_id&page=1", $title, false), $title);

Replace With::
Code
				$returndata[$i]['subforum_links']["$sub_id"][0] = sprintf('<div class="subforum"><a href="%s">%s</a></div>', make_ubb_url("ubb=postlist&Board=$sub_id&page=1", $title, false), $title);

Find:
Code
				$returndata[$i]['subforums'] .= ($subforum_moo[0] . (($subforum_moo[1] > 0) ? sprintf(' <span class="newtotal">(%s)</span>', $subforum_moo[1]) : '') . ', ');

Replace With::
Code
				$returndata[$i]['subforums'] .= ($subforum_moo[0] . (($subforum_moo[1] > 0) ? sprintf(' <span class="newtotal">(%s)</span>', $subforum_moo[1]) : '') . ' ');


In templates/default/forum.tpl:
Find:
Code
					{if $forum[cats][fora].subforums}{$lang.SUBFORUMS} {$forum[cats][fora].subforums}{/if}

Replace With::
Code
					{if $forum[cats][fora].subforums}<img src="{$config.BASE_URL}/images/{$style_array.general}/subforum.png" alt=""> {$forum[cats][fora].subforums}{/if}


Please leave your thanks below so we can know that we've helped you!



UBBT 7.5.8 using UBBCentral.com default "blue-orange" style:
Attachments
subforums1.png (23.54 KB, 38 downloads)
BEFORE:
subforums2.png (22.86 KB, 40 downloads)
AFTER (with this mod):


UBBDev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.threads: My UBB Themes, My UBB Scripts
Sponsored Links
Entire Thread
Subject Posted By Posted
[7.x] Subforum Highlights Gizmo 09/12/2014 7:10 AM
Re: [7.x] Subforum Highlights Bill B 09/12/2014 12:07 PM
Re: [7.x] Subforum Highlights isaac 09/12/2014 12:14 PM
Re: [7.x] Subforum Highlights Gizmo 09/12/2014 12:27 PM
Re: [7.x] Subforum Highlights Bill B 09/12/2014 12:40 PM
Re: [7.x] Subforum Highlights Gizmo 09/12/2014 1:24 PM
Re: [7.x] Subforum Highlights Bill B 09/12/2014 2:14 PM
Re: [7.x] Subforum Highlights isaac 09/12/2014 2:55 PM
Re: [7.x] Subforum Highlights Gizmo 09/13/2014 4:25 AM

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
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
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,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
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-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)