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
Excellent! Easily one of the best new mods, thanks Ian
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
Good job! (Al did really most of the job)
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;
}
}
Hi there. Must be stupid, but I only get + and no - , no matter if the category is minimized or not.
can I have a link to your forum, and a login/password if it only allows registered users in?
Sure!
It´s in Swedish...
Coming by PM right away!
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
<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
<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>
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.
please give me examples of what you're having trouble with. All of that code should be in the corresponding files
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~
Young, search for:
quote:
# Caution: Relies on lots of local()s
And post the lines above it, it should be below:
Give the 5 lines above and below it.
Wow, this is just a fantastic mod. It should be implemented into the next UBB version.
Updated with fix for the guy who doesn't have a single normal letter in his name
this bites
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.
Actually I believe his "g" and "T" are regular
^$#^%#$^%#
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
Updated.
And LK, those are the rare South African Jungle "g"s and "T"s.
Yeh, watch out of a headhunter will steal your i, n, and e's.. Then you'll be A Spc
...
updated with a fix that the + and - would show an incorrect color if the posts in the category were made at special times
which portions need updated?
###########
# 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
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?
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.
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.
Ian: If I took out this line of code, it shouldn't matter, correct?
document.write('<style type="text/css">body { visibility:hidden;}</style>');
it'll still work, just the page will load weird
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
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
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"
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 ?
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?
Thank you Ian and LK
It works properly on UBB 6.6 (^_^)
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)
ps - great mod!
to edit the colors, you should edit this step,
<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
I tried to install this and I got a white page that didn't go away. Any ideas?
view the source code... is there any? if the page is there, make sure the onload for the body is present
About this step,
find:
In the file public_forum_summary.pl, I don't have it, the closest thing is:
Is it the same and should I do this step as usual?
On ubb 6.7.1 btw
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
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?
could we have a link to where you are trying this?
Sorry I'm afraid I can't give the link it's a private board, will a screen cap of the page help?
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
Ok I'll search, tnx
I do have split categoreis/posts, could it be related to that?
ugh, that's quite possible, and could be why you couldn't find the image code earlier
I am getting this, but there isn't any fields showing up to put anything into.
!! Could not find var def for vars_display :: CategoriesMini
redo the steps in cp2_vars.cgi
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
ugh.. its not saving my cache preferences anymore, any advive? I reset my browser and the forum cache, nothing is sticking..
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
I did, I cleaned out and reset my entire browser, its getting a bit frustrating
bah
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
nope and nope, neither worked and I never get an error
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
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
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
You are my new bestest friend... :hands over Jesters Cap:
wow!
only three posts here and I have a new bestest friend.
:wears cap with pride: