Log in

View Full Version : Chat Room opening image


SiFor
07-29-2004, 05:48 PM
Not sure if I'm asking this in the correct fourm or site even, on my site I have a chatroom that we have a weekly get together on Thursday. The rest of the time its just left open for others to wonder in or PM another member to join them for a chat.

What I would like though is to display an image in the forum header when its Thursday to let members know that its chat day, now that I can do but I need to manually change the image every week to say its open then change it again to say its closed. What I'd like to know is there a way that I can make this automatic with the use of some kind of condition in the template or do I need a script or similar for this job?

Thanks, Si :nervous:

Colin F
07-29-2004, 05:55 PM
you could try inserting this in your phpinclude template:

if(date("w") == 4)
{
$chatimage = <img src="images/misc/chatimage.jpg" alt="chat today!" />
}

Then add the $chatimage to the place where you want the image to go (header template probably)
Change the image path to where your image is.

SiFor
07-29-2004, 06:29 PM
you could try inserting this in your phpinclude template:

I take it you mean phpinclude_start.

It didnt seem to work and had an effect on some of my other things on my site, This is what I have in my phpinclude_start already.

// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
eval('$navbar2 = "' . fetch_template('navbar2') . '";');

if ($bbuserinfo['field8'] == 'Top')
{
$vboptions['legacypostbit'] = 0;
}
else
{
$vboptions['legacypostbit'] = 1;
}

Colin F
07-29-2004, 06:35 PM
make that

$chatimage = '<img src="images/misc/chatimage.jpg" alt="chat today!" />'

SiFor
07-29-2004, 06:48 PM
Still the same I'm afraid, I also tried it on a vannila install I have on my local machine but that doesnt work also.