TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 304
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 264
  • Total: 264

Flashchat Block Text Color

Started by bhunted, February 28, 2006, 04:58:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bhunted

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...  :-\

crip

You might could try adding something like <div text style="red">&&&&&&&&&&&&&</div>  ?

bhunted


bhunted

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>';

crip

add here above everything:
___________
Above it yes

bhunted

Opps, messages crossed. Your's is blank after the colon? ???

crip

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>';

bhunted

Tried that already along with all the other typical html tricks... Got to be another way.... ugh..

crip

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.. :)


bhunted

Got it partially figured out. Changed/added a different color to the embedded info php file...
But the users still come through black...

bhunted


crip

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 . '');


crip

I no man..
I just can't do it.. I bet that - // print $boardurls');
is what we need but, where At is the question?

bhunted

Beats me.... I'm afraid changing one thing may make the data unreadable where it needs to be legible...

crip


bhunted

Well, some of the css files are built into the actual page itself. That's how I changed the embedded file.

ToyDozer

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>

ToyDozer

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.

bhunted

Already figured most of it, but just needed that one line change

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

Thanks a bunch!

PokerOwnage

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.

technodragon73

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?

tamasir

#21
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~

gumdrop

#22
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!

This website is proudly hosted on Crocweb Cloud Website Hosting.