1
ivandr
Simple BB2 hack - need assistance with
  • 2006/1/17 0:43

  • ivandr

  • Just popping in

  • Posts: 14

  • Since: 2005/6/2 7


Hi, im trying to make a simple change to the BB2 forum.

On the index view of the forum, and forum view, i want to be able to expand or minimise the "online" section, and the "notification" section.

I havnt tried notification yet but i managed to get online bit to work using the below.

<img onclick="ToggleBlock2('online', this)" srcimages/minus.png" alt="" />

online" style="displayblock">
***Online table****


I managed to get that working fine, but how can i get it to always be minimised by default, just to clear up some room, and people can expand it themselves if they choose.

Any help appreciated.

Regards,
Ivan

2
ivandr
Re: Simple BB2 hack - need assistance with
  • 2006/1/17 1:01

  • ivandr

  • Just popping in

  • Posts: 14

  • Since: 2005/6/2 7


Ok, so im new at this... I realise it uses the below code to store the info to a cookie, so i guess i could store this info to the cookie aswell somehow...

Not sure, will keep looking.

foreach($categories as $onecat){
    
$forums = array();

    
$catid=$cats.$onecat->getVar('cat_id');
    
$catshow true;
    if (isset(
$_COOKIE['newbb2_toggle']))
    {
        
$cookiearr split(',',$_COOKIE['newbb2_toggle']);
        
$catshow = (in_array($catid$cookiearr)) ? false true;
    }

    
$display = ($catshow) ? 'block;' 'none;';
    
$display_icon  = ($catshow) ? 'images/minus.png' 'images/plus.png';

    if (isset(
$forumsByCat[$onecat->getVar('cat_id')])) {
        
$forums $forumsByCat[$onecat->getVar('cat_id')];
    }


But on the upside i realised that all i have to do is replace 'block' to 'none' to have it default to be closed, which is cool by me for now, but it would be good to have it default to what is written in a cookie.

Regards,
Ivan

Login

Who's Online

417 user(s) are online (265 user(s) are browsing Support Forums)


Members: 0


Guests: 417


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits