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

Author(s): Ian Spence, LK

Description: Allows the user to hide and show categories at will, and saves their choices in a cookie

Demo: http://www.alforadmin.com/forums

Requirements: UBB.classic 6.7

Download Link: https://www.ubbdev.com/ubb/upload/00020028/CategoryMinimizing67.zip

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Excellent! laugh

Easily one of the best new mods, thanks Ian thumbsup


- Allen wavey
- What Drives You?
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Don't forget to thank LK. I did the html, hiding part. He did the perl/colors for new posts/the one thing I can describe but most wouldn't understand it thing

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Good job! (Al did really most of the job)

Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
Sorry, it's me again!

I can not find the following code at public_forum_summary.pl (file from 6.7 final)

# FIND: #
###########

my $modby = qq~
$vars_wordlets{moderated_by} $Moderator~;
if((($Moderator eq $vars_wordlets{"no_mods"}) && ($vars_display{DisplayModBy} eq "nomods"))
|| ($vars_display{DisplayModBy} eq "no")) {
$modby = "";
} # end if

###############
# ADD AFTER: #
###############

if($ThisHTML =~ m/^.+bulbcolor("(d{7}.d{4})","(d+)");/isg) {
my $whatever = $1;
if ($LastPostJulian > $whatever) {
$ThisHTML =~ s/^(.+)bulbcolor("(d{7}.d{4})","(d+)");/$1 bulbcolor("$LastPostJulian","$3");/isg;
}
}


Webmaster of d-talk & Kabel-Forum.com
Sponsored Links
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
updated

Joined: May 2001
Posts: 58
Member
Member
Offline
Joined: May 2001
Posts: 58
Hi there. Must be stupid, but I only get + and no - , no matter if the category is minimized or not.

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
can I have a link to your forum, and a login/password if it only allows registered users in?

Joined: May 2001
Posts: 58
Member
Member
Offline
Joined: May 2001
Posts: 58
Sure!

It´s in Swedish... smile

Coming by PM right away!

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
I found the problem, however there seems to be an issue with flareupload right now, so here is the fix itself.

In public_forum_summary.pl, change

Code
<a href="javascript:void(0);" onclick="hideit('$cat_number' , 'visible');"><span id="shown-$cat_number">
<img src="$vars_config{NonCGIURL}/catexpand.gif" alt="[-]" id="imgshown-$cat_number" border="0"/></span></a>
to

Code
<a href="javascript:void(0);" onclick="hideit('$cat_number' , 'visible');"><span id="shown-$cat_number">
<img src="$vars_config{NonCGIURL}/catminimize.gif" alt="[-]" id="imgshown-$cat_number" border="0"/></span></a>

Sponsored Links
Joined: May 2001
Posts: 58
Member
Member
Offline
Joined: May 2001
Posts: 58
Thanks, it worked!

Joined: Aug 2001
Posts: 103
Member
Member
Offline
Joined: Aug 2001
Posts: 103
Am I missing something? I followed the replace, add after instructions but looks like some of the code I am supposed to search for in the original .pl file is different from the instructions.

I have the latest 6.7.

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
please give me examples of what you're having trouble with. All of that code should be in the corresponding files

Joined: Aug 2001
Posts: 103
Member
Member
Offline
Joined: Aug 2001
Posts: 103
sub Normal_Table_Row {
use vars qw($ThisHTML);
# Caution: Relies on lots of local()s

is what you are asking to find.

this is what i actually have.

sub Normal_Table_Row {
# Caution: Relies on lots of local()s
my $Row = qq~

Joined: Aug 2001
Posts: 103
Member
Member
Offline
Joined: Aug 2001
Posts: 103
any update on this?

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Young, search for:

Quote
quote:
# Caution: Relies on lots of local()s
And post the lines above it, it should be below:

Code
sub Normal_Table_Row {
Give the 5 lines above and below it.


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, My UBB Scripts
Joined: Sep 2000
Posts: 221
Member
Member
Offline
Joined: Sep 2000
Posts: 221
Wow, this is just a fantastic mod. It should be implemented into the next UBB version.


This is the designed behavior.
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Updated with fix for the guy who doesn't have a single normal letter in his name

Joined: Aug 2001
Posts: 103
Member
Member
Offline
Joined: Aug 2001
Posts: 103
this bites laugh for some reason I am getting both the - and + gif with one on top of each other and not clickable.

did the mod three times double checking each line for mistakes.

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Actually I believe his "g" and "T" are regular tipsy

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
^$#^%#$^%#

Do me a favor. Go into your CP, go to "General" under "Display Options". Once on that page, just click submit. While you do that, I'll update the zip

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Updated.


And LK, those are the rare South African Jungle "g"s and "T"s. wink

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Yeh, watch out of a headhunter will steal your i, n, and e's.. Then you'll be A Spc smirk...


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, My UBB Scripts
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
updated with a fix that the + and - would show an incorrect color if the posts in the category were made at special times

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
which portions need updated?


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, My UBB Scripts
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Code
###########
# FIND: #
###########

sub Normal_Table_Row {
# Caution: Relies on lots of local()s

###############
# ADD AFTER: #
###############
use vars qw($ThisHTML);
if($ThisHTML =~ m/^.+bulbcolor("(.+?)","(d+)");/isg) {
my $whatever = $1;
if ($LastPostJulian > $whatever) {
$ThisHTML =~ s/^(.+)bulbcolor("(.+?)","(d+)");/$1 bulbcolor("$LastPostJulian","$3");/isg;
}
}
that step

Joined: Jul 2003
Posts: 6
mmg Offline
Junior Member
Junior Member
Offline
Joined: Jul 2003
Posts: 6
I'm running into a slight problem with this mod. It works perfectly as long as all of my categories are maximized by default, but when I set a category to be shown as collapsed by default it won't open. Does this occur for anyone else, or did I do something wrong while installing it?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
When you minimize a category via the code built into UBB, it doesn't minimize it as much as not print any of it's forums.

Joined: Nov 2003
Posts: 11
Junior Member
Junior Member
Offline
Joined: Nov 2003
Posts: 11
Ian,

Man, I wanted this one to work right... it flat "broke" my public-forum_summary.pl file... I'm sure it was simply something I did wrong; I probably interpreted the Find/Add After et al. instructions wrong in some place.

I got a "missing closing curly brace or square bracket missing at line 667 " and a failure to compile error.

I will start again from a "known-good" place later and document step by step what I do until (if) it breaks.


Clay Autery
"More, Better, Faster..."
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
Ian: If I took out this line of code, it shouldn't matter, correct?

Code
document.write('<style type="text/css">body { visibility:hidden;}</style>');

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
it'll still work, just the page will load weird

Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
hehehe actually it loads fine now that I found and deleted that sniplet of code.

It was causing my forum summary to load with a ALL WHITE page first (very quickly, not tooo noticeable) and then the forum summary

now theres no white page that loads. Good deal wink

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
Originally posted by havoq:

hehehe actually it loads fine now that I found and deleted that sniplet of code.

It was causing my forum summary to load with a ALL WHITE page first (very quickly, not tooo noticeable) and then the forum summary

now theres no white page that loads. Good deal wink

That was more of a design feature LK and I decided on. People with slow connections will have all the categories shown until the entire page loads, then they'll minimize, hence "weird page loading"

Joined: Aug 2000
Posts: 178
Member
Member
Offline
Joined: Aug 2000
Posts: 178
Brings up an interesting question. Is it possible to create a version that utilizes Infopops version (not actually drawing the minimized forums) with this hack (indicating posts within the control panel minimized category & +/- to open close).

That possible ?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
I'm sorry, but I don't understand what you mean.

You want to have the + and - in the CP to minimize categories, instead of the checkboxes?

Joined: Jan 2004
Posts: 15
Junior Member
Junior Member
Offline
Joined: Jan 2004
Posts: 15
Thank you Ian and LK

It works properly on UBB 6.6 (^_^)

Joined: Sep 2001
Posts: 61
Member
Member
Offline
Joined: Sep 2001
Posts: 61
two questions (sorry for all the questions today)

1) is there a way with this mod to make the board default with certain categories minimized?

2) this is probably a dumb question, how do you change the color of those gif files? I'm looking for blue for new messages and dark grey for old (something that more closely matches my custom message lights below)

[Linked Image] [Linked Image]

ps - great mod!

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
to edit the colors, you should edit this step,

Code
<style type="text/css">
.newbulb { background-color : #FFA800; border: 1px solid #FFA800; }
.oldbulb { background-color : #6A89B1; border: 1px solid #6A89B1; }
</style>
change the hexcodes to work with your colorscheme

as for question 1, it's not available yet, possibly in the next version

Joined: Sep 2001
Posts: 61
Member
Member
Offline
Joined: Sep 2001
Posts: 61
thanks!

Joined: Jul 2000
Posts: 49
Member
Member
Offline
Joined: Jul 2000
Posts: 49
I tried to install this and I got a white page that didn't go away. Any ideas?

Page 1 of 2 1 2

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)