Home | Members Center | Contact us

-iBHacks and Support
--Forum: New Hacks
---Topic: Adding group colour to the 'birthday' members started by Sly

Sly
63% of all statistics are made up... including this one.



Admin
5467
June 2002
April 28 2003,16:09

TITLE: Adding group colour to the 'birthday' members
AUTHOR: Sly

This hack adds the member group colour to the members who are celebrating a birthday

------
Files needed:

cgi-bin/Sources/Profile.pm
cgi-bin/Sources/Boards.pm
cgi-bin/Skin/Default/MenuView.pm
cgi-bin/Database/config/calendar.cfg

------
Profile.pm

1) Find:
Code Sample

DAY          => $iB::IN{'day'},

and below that add:
Code Sample

MEMBER_GROUP => $iB::IN{'MEMBER_GROUP'},


2) then repeat this a 2nd time about ten lines further down

Save and upload

------
MenuView.pm

3) Find:
Code Sample

    <input type='hidden' name='CODE' value='02'>
    <input type='hidden' name='s' value='$iB::SESSION'>

and below that add:
Code Sample

<input type='hidden' name='MEMBER_GROUP' value="$iB::MEMBER->{'MEMBER_GROUP'}">


Save and upload

------
calendar.cfg

4) Find:
Code Sample

"MINUTE"    => [10, 'num',    2  , 1 ],

and below that add:
Code Sample

"MEMBER_GROUP"    => [11, 'num',    2  , 1 ],


or add that to the end of the list of fields making sure you do not break the number sequence.

Save and upload

------
Boards.pm

Find:
Code Sample

$birthusers        .= qq~<span        id='highlight'>></span><a href='$iB::INFO->{'BOARD_URL'}/ikonboard.$iB::INFO->{'CGI_EXT'}?act=Profile;CODE=03;MID=$w->{'MEMBER_ID'}'> $w->{'MEMBER_NAME'} </a> $year ~;

and change that to:
Code Sample

$birthusers        .= qq~<span        id='highlight'>></span><a href='$iB::INFO->{'BOARD_URL'}/ikonboard.$iB::INFO->{'CGI_EXT'}?act=Profile;CODE=03;MID=$w->{'MEMBER_ID'}'>$format{ $w->{MEMBER_GROUP} }->{ST} $w->{'MEMBER_NAME'} $format{ $w->{MEMBER_GROUP} }->{END}</a> $year ~;


Save and upload

Now go and clear the calender update lock in the AdminCP to update members currently celebrating!!

and you are done  :cool:

NOTE: You must rebuild your skin .cfg files using the link in the AdminCP after adding this hack.


[ iB Supported home ]

I love smilies!
Back to top
       
Sly
63% of all statistics are made up... including this one.



Admin
5467
June 2002
April 28 2003,17:36

For SQL you also need:

phpMyAdmin
SQL
ALTER TABLE `ib_calendar` ADD `MEMBER_GROUP` TINYINT( 2 ) DEFAULT '0' NOT NULL ;


SQLClient
SQL
ALTER TABLE `ib_calendar` ADD `MEMBER_GROUP` TINYINT( 2 );


[ iB Supported home ]

I love smilies!
Back to top
       



Content © 2002-2003 slys.co.uk
Page Converter by iBSupported.com
Copyright © 2002 iBSupported - Legal Policy