TinyPortal

Development => Block Codes => Topic started by: bhunted on February 28, 2006, 04:58:05 PM

Title: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 04:58:05 PM
Anyone know a simple way to change text color in a php block?
I have flashchat users list in one and it comes out black but rather it be white because the theme is dark...

Any help be appreciated...  :-\
Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 06:06:01 PM
You might could try adding something like <div text style="red">&&&&&&&&&&&&&</div>  ?
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 06:10:14 PM
within the php block code?
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 06:13:10 PM
All I want to happen is the Flashchat users block to be white....I tried adding above before and after the php code. Didn't work...

This is the code I use:

global $boardurl;
echo '
<iframe frameborder="0" height="100" src="', $boardurl, '/chat/info_embedded.php" style="width:100%;  font color: white; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';
Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 06:13:41 PM
add here above everything:
___________
Above it yes
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 06:15:23 PM
Opps, messages crossed. Your's is blank after the colon? ???
Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 06:20:07 PM
Maybe this way with a hex?

global $boardurl;
echo '
<iframe frameborder="0" height="100" src="', $boardurl, '/chat/info_embedded.php" style="width:100%;  font color=#ffffff; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 06:23:14 PM
Tried that already along with all the other typical html tricks... Got to be another way.... ugh..
Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 06:31:50 PM
Possibly change the background color.. this is a tuff one..lol..

I'm also trying this on my Chat block..will keep at it.. there is a solution for every problem.. :)

Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 06:44:56 PM
Got it partially figured out. Changed/added a different color to the embedded info php file...
But the users still come through black...
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 06:48:49 PM
Here's a screen shot:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fbigjohnsbikes.net%2Fback%2Fchatusers.jpg&hash=b9023a07bec7d07617816a973fb148d123aafc37)
Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 07:00:30 PM
This works in another php block, but adding the $boardurl in chat (not sure).. maybe a php junkie can help us figure this..
$linkarray = array(
"|Do you know the names of the three wise monkeys? They are: Mizaru (See no evil), Mikazaru (Hear no evil), and Mazaru (Speak no evil).",
"|An atomic clock is accurate to within 1 second in 1,7 million years",
"|Thomas Cook, the world's first travel agency in the world, was founded in 1850",
"|A fathom is 1,8 metres (6 feet).",
"|There are more TV sets in the US than there are people in the UK");
// seed the random number generator
srand((double)microtime()*1000000);
// get a random entry
$randval = rand(0,count($linkarray)-1);
// explode random entry into an array
$entry = explode("|",$linkarray[$randval]);
// print entry
$content = "<div align=\"justify\"><font color=\"orange\">$entry[1]</div>";
print (''. $content . '');

Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 07:04:17 PM
I no man..
I just can't do it.. I bet that - // print $boardurls');
is what we need but, where At is the question?
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 11:15:48 PM
Beats me.... I'm afraid changing one thing may make the data unreadable where it needs to be legible...
Title: Re: Flashchat Block Text Color
Post by: crip on February 28, 2006, 11:27:01 PM
maybe in the style .css file
Title: Re: Flashchat Block Text Color
Post by: bhunted on February 28, 2006, 11:41:43 PM
Well, some of the css files are built into the actual page itself. That's how I changed the embedded file.
Title: Re: Flashchat Block Text Color
Post by: ToyDozer on April 09, 2006, 10:45:13 PM
Well this was fun, but all worth it when you end up with success!!!
Back up your files
Open up info_embedded.php from your chat directory
Do a search for the "<html>" tag select everything from that html tag down and replace with the  modded code below. I choose a font color #C0C0C0 so if you want to change yours to something else search for that code and replace as needed. See attached file so preview.
<html>
<title>Who's in the chat?</title>
<meta http-equiv=Content-Type content="text/html;  charset=UTF-8">
<head>
<style type="text/css">
<!--

body { background-color: transparent; margin: 0; padding: 0; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; font-size: 10px;}
....normal {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
margin: 0; padding: 0;

}

#roomList { margin: 0; padding: 0; color: #C0C0C0; }
#roomList a { color: #C0C0C0; text-decoration: none; } #roomList a:hover { text-decoration: underline; }
....userList { margin-left: 7px; margin-right: 0; margin-bottom: 0; margin-top: 0;  padding: 0; }

-->
</style>
<script type="text/javascript">
function toggleUserList(id) {
   if (l = document.getElementById(id)) {
      if (l.style.display == '' || l.style.display == 'block') l.style.display = 'none';
      else l.style.display = 'block';
   }
   return false;
}

</script>
</head>
<body bgcolor="#363636">
<font color="#C0C0C0">
<p class=normal><?php echo $usernumb ?> user<?php if ($usernumb != 1) echo "s" ?> in <?php echo $roomnumb ?> room<?php if ($roomnumb != 1) echo "s"; ?>.</p>
<ul id="roomList">
<?php if($roomnumb) { ?>
<?php foreach($rooms as $room) { ?>
<li><a href="#" onclick="javascript:toggleUserList('room_<?php echo $room['id']?>')"><?php echo $room['name']?> (<?php echo numusers($room['id']) ?>)</a>
<?php

$users = usersinroom($room['id']);
                                       if (
$users) {
                                         echo
"<ul class=\"userList\" id=\"room_".$room['id']."\">";
                                         foreach(
$users as $user ) {
   echo "<li>".$user['login'] . "</li>";
 }
                                         echo
"</ul>";
                                       }

?> </li>
<?php } ?>
<?php } ?>
</ul>
</font>
</body>
</html>
Title: Re: Flashchat Block Text Color
Post by: ToyDozer on April 09, 2006, 10:46:42 PM
Oh I also removed the <stronge> tags from that clip. I didn't like the bold look of it, seemed blurry to me. I like the cleanliness of the text without it.
Title: Re: Flashchat Block Text Color
Post by: bhunted on April 09, 2006, 11:03:27 PM
Already figured most of it, but just needed that one line change

#roomList { margin: 0; padding: 0; color: #C0C0C0; }

Thanks a bunch!
Title: Re: Flashchat Block Text Color
Post by: PokerOwnage on April 11, 2006, 08:38:00 PM
all you need to know is some html... in the info_embedded.php file... at the bottom around line 130 or something is where it is displayed.  Just edit the code and add some font color="red" or what ever colors you wanted... ill paste code to show you if you need me to.
Title: Re: Flashchat Block Text Color
Post by: technodragon73 on April 12, 2006, 04:49:29 PM
ok...I got a hard one for you...how can you make it auto adjust the color depending on the theme?

On my forum I let users pick their themes and some are dark, some are light.  So how can I recode this to change based on the theme?
Title: Re: Flashchat Block Text Color
Post by: tamasir on November 13, 2006, 11:51:11 PM
ToyDozer
I am so happy! It was a good effort . :up:
To be in good order my code!


My the problem also! On my forum I let users pick their themes and some are dark, some are light.  So how can I recode this to change based on the theme?
tamasir~
Title: Re: Flashchat Block Text Color
Post by: gumdrop on November 18, 2006, 11:52:40 PM
Seems firefox doesn't like that....
It likes something like this if your displaying online users in different colors:

li { color: #C2CEDA; text-decoration: none;}


Quote from: bhunted on April 09, 2006, 11:03:27 PM
Already figured most of it, but just needed that one line change

#roomList { margin: 0; padding: 0; color: #C0C0C0; }

Thanks a bunch!