UBB.Dev
Posted By: Ian Spence [6.7] [beta] Category Minimizing - 02/06/2004 11:09 PM
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
Posted By: AllenAyres Re: [6.7] [beta] Category Minimizing - 02/06/2004 11:24 PM
Excellent! laugh

Easily one of the best new mods, thanks Ian thumbsup
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 02/06/2004 11:38 PM
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
Posted By: LK Re: [6.7] [beta] Category Minimizing - 02/07/2004 1:14 PM
Good job! (Al did really most of the job)
Posted By: d-talk Re: [6.7] [beta] Category Minimizing - 02/08/2004 7:08 PM
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;
}
}
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 02/08/2004 7:23 PM
updated
Posted By: Eric Flyxe Re: [6.7] [beta] Category Minimizing - 02/26/2004 3:01 PM
Hi there. Must be stupid, but I only get + and no - , no matter if the category is minimized or not.
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 02/26/2004 3:26 PM
can I have a link to your forum, and a login/password if it only allows registered users in?
Posted By: Eric Flyxe Re: [6.7] [beta] Category Minimizing - 02/26/2004 4:50 PM
Sure!

It´s in Swedish... smile

Coming by PM right away!
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 02/26/2004 5:17 PM
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>
Posted By: Eric Flyxe Re: [6.7] [beta] Category Minimizing - 02/26/2004 6:04 PM
Thanks, it worked!
Posted By: Poopy Pants Re: [6.7] [beta] Category Minimizing - 03/03/2004 3:03 AM
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.
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 03/03/2004 3:19 AM
please give me examples of what you're having trouble with. All of that code should be in the corresponding files
Posted By: Poopy Pants Re: [6.7] [beta] Category Minimizing - 03/03/2004 3:52 AM
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~
Posted By: Poopy Pants Re: [6.7] [beta] Category Minimizing - 03/09/2004 2:38 PM
any update on this?
Posted By: Gizmo Re: [6.7] [beta] Category Minimizing - 03/09/2004 2:40 PM
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.
Posted By: bryan868 Re: [6.7] [beta] Category Minimizing - 03/11/2004 1:17 AM
Wow, this is just a fantastic mod. It should be implemented into the next UBB version.
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 03/12/2004 9:07 PM
Updated with fix for the guy who doesn't have a single normal letter in his name
Posted By: Poopy Pants Re: [6.7] [beta] Category Minimizing - 03/14/2004 9:41 AM
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.
Posted By: LK Re: [6.7] [beta] Category Minimizing - 03/14/2004 2:32 PM
Actually I believe his "g" and "T" are regular tipsy
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 03/14/2004 5:08 PM
^$#^%#$^%#

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
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 03/14/2004 5:16 PM
Updated.


And LK, those are the rare South African Jungle "g"s and "T"s. wink
Posted By: Gizmo Re: [6.7] [beta] Category Minimizing - 03/14/2004 5:53 PM
Yeh, watch out of a headhunter will steal your i, n, and e's.. Then you'll be A Spc smirk...
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/08/2004 11:06 PM
updated with a fix that the + and - would show an incorrect color if the posts in the category were made at special times
Posted By: Gizmo Re: [6.7] [beta] Category Minimizing - 04/08/2004 11:26 PM
which portions need updated?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/08/2004 11:34 PM
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
Posted By: mmg Re: [6.7] [beta] Category Minimizing - 04/18/2004 7:33 AM
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?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/18/2004 2:56 PM
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.
Posted By: Clay Autery Re: [6.7] [beta] Category Minimizing - 04/20/2004 6:53 AM
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.
Posted By: havoq Re: [6.7] [beta] Category Minimizing - 05/17/2004 7:09 AM
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>');
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 05/17/2004 2:43 PM
it'll still work, just the page will load weird
Posted By: havoq Re: [6.7] [beta] Category Minimizing - 05/17/2004 4:32 PM
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
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 05/17/2004 5:07 PM
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"
Posted By: Painfool Re: [6.7] [beta] Category Minimizing - 05/18/2004 7:57 PM
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 ?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 05/18/2004 9:52 PM
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?
Posted By: Cho Phoo Re: [6.7] [beta] Category Minimizing - 05/19/2004 7:31 PM
Thank you Ian and LK

It works properly on UBB 6.6 (^_^)
Posted By: DocDoom Re: [6.7] [beta] Category Minimizing - 06/17/2004 10:18 PM
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!
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 06/17/2004 10:56 PM
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
Posted By: DocDoom Re: [6.7] [beta] Category Minimizing - 06/17/2004 11:13 PM
thanks!
Posted By: Neptin Re: [6.7] [beta] Category Minimizing - 02/19/2005 4:40 PM
I tried to install this and I got a white page that didn't go away. Any ideas?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 02/19/2005 8:06 PM
view the source code... is there any? if the page is there, make sure the onload for the body is present
Posted By: Tiger66 Re: [6.7] [beta] Category Minimizing - 04/12/2005 2:24 AM
About this step,

find:
$vars_wordlets{forum_summ_legend_new}


In the file public_forum_summary.pl, I don't have it, the closest thing is:

$vars_wordlets_img{alt_bulb_on}

Is it the same and should I do this step as usual?

On ubb 6.7.1 btw
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/12/2005 2:35 AM
that's odd, but the step doesn't even matter, it only places the icon at the bottom to tell people what it means. but yes, those should be interchangeable
Posted By: Tiger66 Re: [6.7] [beta] Category Minimizing - 04/13/2005 4:00 AM
For some reason the rooms tables doesn't load, I mean nothing below the recent visitors table, above there everything is as usual, already tried to re hack 3 times, any help on this please?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/13/2005 5:41 AM
could we have a link to where you are trying this?
Posted By: Tiger66 Re: [6.7] [beta] Category Minimizing - 04/14/2005 2:15 AM
Sorry I'm afraid I can't give the link it's a private board, will a screen cap of the page help?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/14/2005 2:32 AM
no, I can picture it

make sure that there are no open tags within the code you modified

ie,

notice how the is still open
Posted By: Tiger66 Re: [6.7] [beta] Category Minimizing - 04/14/2005 3:47 AM
Ok I'll search, tnx

I do have split categoreis/posts, could it be related to that?
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 04/14/2005 4:03 AM
ugh, that's quite possible, and could be why you couldn't find the image code earlier
Posted By: AshtarRose Re: [6.7] [beta] Category Minimizing - 11/03/2005 12:08 PM
I am getting this, but there isn't any fields showing up to put anything into.

[Linked Image]

!! Could not find var def for vars_display :: CategoriesMini
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 11/04/2005 1:22 AM
redo the steps in cp2_vars.cgi
Posted By: AshtarRose Re: [6.7] [beta] Category Minimizing - 11/08/2005 2:47 AM
I did all that and it worked but now I have another question. Is there an option to click collapse in the category details in the CP so the category would show as collapsed by default? I tried the "collapsed" option with my Moonlight Adult forum and it doesn't open when you click on the + ...

http://hogwartsbynight.com/cgi-bin/cubb/ultimatebb.cgi
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 11/08/2005 6:17 AM
not at this time
Posted By: AshtarRose Re: [6.7] [beta] Category Minimizing - 11/20/2005 10:34 AM
ugh.. its not saving my cache preferences anymore, any advive? I reset my browser and the forum cache, nothing is sticking..
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 11/21/2005 10:13 PM
What do you mean? Are the cache settings in the control panel not sticking, or are you saying that your showing and hiding category preferences aren't being saved (ie, you hide everything, but next time you return, it's showing everything )

If the latter, try clearing your cookies
Posted By: AshtarRose Re: [6.7] [beta] Category Minimizing - 11/22/2005 8:54 AM
I did, I cleaned out and reset my entire browser, its getting a bit frustrating smile bah
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 11/22/2005 11:00 PM
odd, I just went to your site and it's working for me. go to http://hogwartsbynight.com/cgi-bin/cubb/ultimatebb.cgi?ubb=clearcookies one more time, then try. Also post if your getting any javascript errors when visiting the site
Posted By: AshtarRose Re: [6.7] [beta] Category Minimizing - 11/26/2005 4:42 AM
nope and nope, neither worked and I never get an error
Posted By: elzool Re: [6.7] [beta] Category Minimizing - 12/10/2005 2:37 AM
I just installed this... I don't have any changes to my forum except for the addition of the graphics at the bottom.

Shouldn't something else have happened?

Did I miss something obvious?

-elz
Posted By: Ian Spence Re: [6.7] [beta] Category Minimizing - 12/10/2005 4:53 AM
All I can really say without seeing the forums is that make sure you did all of the steps for public_forum_summary.pl correctly
Posted By: elzool Re: [6.7] [beta] Category Minimizing - 12/12/2005 7:43 PM
lol
don't mind me

I really shouldn't try and work on things that require detailed work when I have taken cold medication

This am, everything is fine.
Sorry for the bother.

oh yeah, the reason it wasn't working?

I didn't upload the files

frown
Posted By: Gizmo Re: [6.7] [beta] Category Minimizing - 12/12/2005 8:03 PM
You are my new bestest friend... :hands over Jesters Cap:
Posted By: elzool Re: [6.7] [beta] Category Minimizing - 12/12/2005 10:12 PM
wow!

only three posts here and I have a new bestest friend.

:wears cap with pride:
© UBB.Developers