mr e
08-09-2002, 06:18 AM
ok i've been trying to make this hack but i dont know enough about mysql to get it done, what it does is instead of a new post/thread graphic i just want the background of the cell on the index.php to change color...i know this has to be in the index.php around the // do light bulb area, BUT the thing is i only want it to change color if it's a specific style, all the other styles would still have the graphic...this is what i have so far and i know im doing it wrong because for the life of me i cant get it to work
$style=$DB_site->query_first("SELECT styleid FROM style WHERE styleid IS NOT NULL AND userselect=1");
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
if ($style['styleid'] == '5') {
$forum['onoff']='#999999';
} else {
$forum['onoff']='on';
}
} else {
if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
$userlastvisit=$bbforumview[$forum['forumid']];
} else {
$userlastvisit=$bbuserinfo['lastvisit'];
}
if ($userlastvisit<$forum['lastpost']) {
if ($style['styleid'] == '5') {
$forum['onoff']='#999999';
} else {
$forum['onoff']='on';
}
} else {
if ($style['styleid'] == '5') {
$forum['onoff']='#666666';
} else {
$forum['onoff']='off';
}
}
}
$style=$DB_site->query_first("SELECT styleid FROM style WHERE styleid IS NOT NULL AND userselect=1");
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
if ($style['styleid'] == '5') {
$forum['onoff']='#999999';
} else {
$forum['onoff']='on';
}
} else {
if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
$userlastvisit=$bbforumview[$forum['forumid']];
} else {
$userlastvisit=$bbuserinfo['lastvisit'];
}
if ($userlastvisit<$forum['lastpost']) {
if ($style['styleid'] == '5') {
$forum['onoff']='#999999';
} else {
$forum['onoff']='on';
}
} else {
if ($style['styleid'] == '5') {
$forum['onoff']='#666666';
} else {
$forum['onoff']='off';
}
}
}