Oneline & Offline Images instead of "Words"

Ask questions, request features, or just complement us about our software and services.
Post Reply
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

Oneline & Offline Images instead of "Words"

Post by sakpasayman »

Hi jay ...... I was wondering is it possible or where in the script I can go to add an image link for Online and offline? I looked in the "includes.php" i saw the online but not the offline I was able to add an image online link and it worked but could not find offline.
here an example of what I'm trying to do. http://www.musictodance.com/rtb/Online_Offline3.php instead of the "online" with words I'd like to have it as an image online and offline. What do you think :?:

Thanx in advance
God Bless.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

should be simple to do just do a conditional in php

Code: Select all

<?php
if ($status[0]['status'] == "Online")
{
     echo '<img src=online.gif>';
}
else
{
     echo '<img src=offline.gif>';
}
?>
Modify that as needed but it just needs a conditional to do an image.
- Jay
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

Online & Offline Images

Post by sakpasayman »

Thank you Jay . One more question Jay:?: do I add the code in the includes.php or create any mane.php file?. Once i finish with it, I will send you a link to see How I customize your script to what I wanted to do :D

Thank You.
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

online offline images

Post by sakpasayman »

Thanx jay. Truly appreciate the help. but one more :?: where do I add this code? is it on the includes.php, playing.php,config.php or catcher.php. I have a feeling you might say the playing.php page, if so , do I put it in top of the page? and where exactly do I add it. I promise not to bother you again and I will send you a link to see what I'm trying to do after i"m done with it.

Thank you very much.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

You put it in the playing page, as I said you will need to customize it to fit your needs so I do not know exactly where you would put it, but I would imagine it would be where you would want the image to show up.
- Jay
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

online & offline images

Post by sakpasayman »

Thank you for the help Jay. I worked on it for many hours, it still showed image offline. I think something is wrong with the code, cause from line 5 to 10 of the code is in black color except for line 8 after echo ' is in red. begining of the code is fine.
" ';
}
else
{
echo '<img src=offline.gif>';
}
?>
And <img src=offline.gif>

here is an example of it http://www.musictodance.com/rtb/Online_Offline2.php
What do you think?

Thanx in advance.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

change the extension to phps and I will check out the code.

Jay
- Jay
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

Post by sakpasayman »

Yes, Jay. I did change the extension to phps then I was able to see a change on the code but Offline was still remain.I will go back and work on it again. Meanwhile check the code for me when you have some times.

Thank you Jay.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

Not seeing it where is the phps version of your script?
- Jay
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

Post by sakpasayman »

Forgive me Jay, I forgot to add the phps link here. Here it is http://www.musictodance.com/rtb/Online_Offline2.phps
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

Your code looks fine,

Check your includes.php file to make sure you are using the right variable.

Also something else you could try is changing your conditional to the following:

Code: Select all

if (eregi("Online", $status[2]['status']))
{
    echo "<img src=online.gif>";
....
That will ensure there isn't something funny about the status value that is messing things up.
- Jay
sakpasayman
Posts: 12
Joined: Fri Sep 06, 2002 5:50 pm
Location: Whitinsville,MA .USA
Contact:

Post by sakpasayman »

I tried it . It did not work. Don't know why. It's nice to know you have been there, helping me. I don't want to seem I'm bothering you to much. I only wish I could get it to work so I can put a link here so others can see the beauty of the script and what they can do with it.
:)
Post Reply