Previous Thread
Next Thread
Print Thread
Rate Thread
[7.x] Subforum Highlights #320591
09/11/2014 11:10 PM
09/11/2014 11:10 PM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
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:

Attached Files
subforums1.png (38 downloads)
BEFORE:
subforums2.png (40 downloads)
AFTER (with this mod):

UBB.Dev - 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, UBB.SitemapsJames Corthell
Sponsored Links
Re: [7.x] Subforum Highlights [Re: Gizmo] #320592
09/12/2014 4:07 AM
09/12/2014 4:07 AM
Joined: Dec 2001
Posts: 84
Issaquah, WA
Bill B Offline
Power User
Bill B  Offline
Power User

Joined: Dec 2001
Posts: 84
Issaquah, WA
Did I miss seeing the "new image"?


Bill Barker
Issaquah, Wa
Re: [7.x] Subforum Highlights [Re: Gizmo] #320593
09/12/2014 4:14 AM
09/12/2014 4:14 AM
Joined: Jul 2001
Posts: 1,208
California
isaac Offline
$coffee=code(true);
isaac  Offline
$coffee=code(true);

Joined: Jul 2001
Posts: 1,208
California
Bill, under "New Image" in the OP, download the png from here...
https://www.ubbdev.com/forums/images/general/default/subforum.png
...and place it in your /forums/images/general/default/ folder.


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.x Progress Reports
Re: [7.x] Subforum Highlights [Re: Gizmo] #320594
09/12/2014 4:27 AM
09/12/2014 4:27 AM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Bill, look under "New Image" and to the left of "Provided by our good friend id242"; it blends in; or the direct URL as Isaac pointed out is https://www.ubbdev.com/forums/images/general/default/subforum.png


UBB.Dev - 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, UBB.SitemapsJames Corthell
Re: [7.x] Subforum Highlights [Re: Gizmo] #320595
09/12/2014 4:40 AM
09/12/2014 4:40 AM
Joined: Dec 2001
Posts: 84
Issaquah, WA
Bill B Offline
Power User
Bill B  Offline
Power User

Joined: Dec 2001
Posts: 84
Issaquah, WA
Okay, found it... I saw my mouse change shape, but I didn't right click on it.

Is the "arrow" suppose to be a new-style link to images? I haven't seen this before.


------
Oh, wait!! The arrow IS THE IMAGE.... okay, I get it.

Last edited by Bill B; 09/12/2014 4:47 AM. Reason: added comment

Bill Barker
Issaquah, Wa
Sponsored Links
Re: [7.x] Subforum Highlights [Re: Gizmo] #320596
09/12/2014 5:24 AM
09/12/2014 5:24 AM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Haha, yes, the new image is the arrow... Let me make it stand out more, lol


UBB.Dev - 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, UBB.SitemapsJames Corthell
Re: [7.x] Subforum Highlights [Re: Gizmo] #320597
09/12/2014 6:14 AM
09/12/2014 6:14 AM
Joined: Dec 2001
Posts: 84
Issaquah, WA
Bill B Offline
Power User
Bill B  Offline
Power User

Joined: Dec 2001
Posts: 84
Issaquah, WA
Okay... one more clarification if you don't mind.

I haven't installed, or tested, this yet, but I"m a tad confused as to what you mean by "will "highlight" your subforums".

A while ago, I added code which "color-codes" my forums depending upon which "group" my members belong in. Is this change similar?


Bill Barker
Issaquah, Wa
Re: [7.x] Subforum Highlights [Re: Gizmo] #320598
09/12/2014 6:55 AM
09/12/2014 6:55 AM
Joined: Jul 2001
Posts: 1,208
California
isaac Offline
$coffee=code(true);
isaac  Offline
$coffee=code(true);

Joined: Jul 2001
Posts: 1,208
California
I just added some screenshots to the OP

Very nice mod, Gizmo. Following your directions, it was quick and easy to implement.


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.x Progress Reports
Re: [7.x] Subforum Highlights [Re: Gizmo] #320599
09/12/2014 8:25 PM
09/12/2014 8:25 PM
Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Gizmo Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline OP

UBB.Dev / UBB.Wiki Owner
Time Lord

Joined: Jan 2000
Posts: 5,947
Portland, OR, USA
Isaac's screen captures on the initial post cover it nicely.


UBB.Dev - 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, UBB.SitemapsJames Corthell

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
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,466
Posts293,522
Members13,801
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,947
Greg Hard 5,533
Top Posters(30 Days)
isaac 1
Today's Statistics
Currently Online 791
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 10
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.0
(Snapshot build 20181115.dev)
PHP: 5.4.45 Page Time: 0.040s Queries: 16 (0.011s) Memory: 3.2310 MB (Peak: 3.4152 MB) Data Comp: Zlib Server Time: 2018-12-10 15:29:04 UTC