PDA

View Full Version : Variable On, Off and Lock images


isman
10-02-2002, 04:54 PM
I'm creating multiple styles and would like the on, off and lock images to be variable by style rather than hard coded. I've got the replacement variables and modified the style.php to make these editable in the modify style but need help with the php code in the index.php.

This is the code I need to modify but don't know what to put.
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
$forum['onoff']='on';
} else {
if (($fview = get_bbarraycookie('forumview', $forum['forumid'])) > $bbuserinfo['lastvisit']) {
$userlastvisit=$fview;
} else {
$userlastvisit=$bbuserinfo['lastvisit'];
}
if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
} else {
$forum['onoff']='off';
}
}

if ((!$forumperms['canpostnew'] and $showlocks) or $forum['allowposting']==0) {
$forum['onoff'].='lock';
}My variables are:
newthreadsimage = on.gif
nonewthreadsimage = off.gif
lockedforumimage = offlock.gif

Can some help me figure out what to do to make these variable work in this code?

Thanks in advance.

Logician
10-02-2002, 08:26 PM
This should shed a light:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=41679&highlight=on.gif