Change Writing Colour
Started on the old forum in January 2008 · view the original in the archive · old links redirect here
I do lol and i wrote it External image (may be gone)) well edited it from the bytes code lmao
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***
the code run only in xhtml/html , not in wml. and where you want to write? in chat? forum?
chatroom and forum blackhawrk mate
find in core.php lines with bb code...
function getbbcode($text, $ses="")
and add this line:
$text = preg_replace("/\(.*)\[\/color\]/Usi", "<font color=\"\\1\">\\2</font>", $text);
then you can use it like this:
[color=red]your text here
your text here
...etc etc...
External image (may be gone) and like blackhowk said.. will only work in XHTML version
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
find in core.php lines with bb code...
function getbbcode($text, $ses="")and add this line:
$text = preg_replace("/\(.*)\[\/color\]/Usi", "<font color=\"\\1\">\\2</font>", $text);then you can use it like this:
your text here your text here ...etc etc...External image (may be gone) and like blackhowk said.. will only work in XHTML version
but that doest let the members pick there colour does it?
your text here your text here ...etc etc...
using bb code like above, anyone can write with coloured text
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
any1 knw how to get text in a rainbow colour or rainbow moving text thankz
what do you mean by moving? if you mean blink.. then add this line in core.php
$text = preg_replace("/\[blink\](.*?)\[\/blink\]/i","<blink>\\1</blink>", $text);
use it with
[blink]text here[/blink]
dunno if theres special code to make text random rainbow coloured External image (may be gone)
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
like erm say a word wid a rainbow colours and the colour starting at beginin of word
LIKE
THIS?
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
yeah but moving colour
i dont know if thats possible maybe some1 else know about that
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
[cody] $text = preg_replace("/[run](.*?)[/run]/i","<marquee direction="left">\1</marquee>", $text);
BBcode by me, running txt, [run][/run]
$text = preg_replace("/\[run\](.*?)\[\/run\]/i","<marquee direction=\"left\">\\1</marquee>", $text);
Here we go, running txt
ok here we go the this allows users to select there own colors for various parts of the site first add these tables to your users dbase..
bgcol varchar(7) NOT NULL default '#000000',
linkcol varchar(7) NOT NULL default '#FF4500',
textcol varchar(7) NOT NULL default '#FFD700',
hcol varchar(7) NOT NULL default '#DC143C',
======================================================= now make this as a sepparate table
--
-- Table structure for table xhtml_hex
CREATE TABLE xhtml_hex (
color varchar(20) NOT NULL default '',
hex varchar(7) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table xhtml_hex
INSERT INTO xhtml_hex VALUES('blue', '#0000FF');
INSERT INTO xhtml_hex VALUES('black', '#000000');
INSERT INTO xhtml_hex VALUES('brown', '#A52A2A');
INSERT INTO xhtml_hex VALUES('crap blue', '#5F9EA0');
INSERT INTO xhtml_hex VALUES('chocolate', '#D2691E');
INSERT INTO xhtml_hex VALUES('cornflower blue', '#6495ED');
INSERT INTO xhtml_hex VALUES('crimson', '#DC143C');
INSERT INTO xhtml_hex VALUES('cyan', '#00FFFF');
INSERT INTO xhtml_hex VALUES('violent', '#00008B');
INSERT INTO xhtml_hex VALUES('something', '#B8860B');
INSERT INTO xhtml_hex VALUES('dark gray', '#A9A9A9');
INSERT INTO xhtml_hex VALUES('khaki', '#BDB76B');
INSERT INTO xhtml_hex VALUES('orange order', '#FF8C00');
INSERT INTO xhtml_hex VALUES('woman scorned', '#8B0000');
INSERT INTO xhtml_hex VALUES('fish paste', '#E9967A');
INSERT INTO xhtml_hex VALUES('seaweed', '#8FBC8F');
INSERT INTO xhtml_hex VALUES('slate blue', '#483D8B');
INSERT INTO xhtml_hex VALUES('violet', '#9400D3');
INSERT INTO xhtml_hex VALUES('pink', '#FF1493');
INSERT INTO xhtml_hex VALUES('sky blue', '#00BFFF');
INSERT INTO xhtml_hex VALUES('bricks', '#B22222');
INSERT INTO xhtml_hex VALUES('trees n shit', '#228B22');
INSERT INTO xhtml_hex VALUES('grannys house', '#DCDCDC');
INSERT INTO xhtml_hex VALUES('going for gold', '#FFD700');
INSERT INTO xhtml_hex VALUES('orange peel', '#DAA520');
INSERT INTO xhtml_hex VALUES('green', '#008000');
INSERT INTO xhtml_hex VALUES('flamingos', '#FF69B4');
INSERT INTO xhtml_hex VALUES('indigo', '#4B0082');
INSERT INTO xhtml_hex VALUES('grass', '#7CFC00');
INSERT INTO xhtml_hex VALUES('marooned', '#800000');
INSERT INTO xhtml_hex VALUES('blue two', '#0000CD');
INSERT INTO xhtml_hex VALUES('purple', '#9370D8');
INSERT INTO xhtml_hex VALUES('minty', '#00FA9A');
INSERT INTO xhtml_hex VALUES('midnight', '#191970');
INSERT INTO xhtml_hex VALUES('red', '#FF4500');
INSERT INTO xhtml_hex VALUES('sand', '#F4A460');
INSERT INTO xhtml_hex VALUES('silver', '#C0C0C0');
INSERT INTO xhtml_hex VALUES('yellow', '#FFFF00');
INSERT INTO xhtml_hex VALUES('white', '#FFFFFF');
================================== now for the fun part of this feature i have
add this to index php
else if($action=="colour") { addonline(getuid_sid($sid),"xhtml colour menu",""); echo "<head>"; $bgcol2 = mysql_fetch_array(mysql_query("SELECT bgcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $bgcol=$bgcol2[0]; $linkcol2 = mysql_fetch_array(mysql_query("SELECT linkcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $linkcol=$linkcol2[0]; $hcol2 = mysql_fetch_array(mysql_query("SELECT hcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $hcol=$hcol2[0]; $textcol2 = mysql_fetch_array(mysql_query("SELECT textcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $textcol=$textcol2[0]; echo "
<style type=\"text/css\"> <!-- body { color: #$textcol; background-color: #$bgcol; text-align: center; } a:link { color: #$linkcol; } a:visited { color: #$linkcol; } .form-container { text-align: center; } h1 { font-size: medium; background-color: #$hcol; color: #textcol; --> </style> </head>"; echo " "; echo "**Colors Menu**"; echo " "; echo " "; echo "This is where you may choose your own color prferences for the site "; echo "We allow you to select your own background color,text colors and links colors "; echo "Please be carefull when chosing your colours as some background colours may not work well with the text colours. ie:black background and black text</br/>note:does not work yet being devloped. "; echo "<a href=\"index.php?action=txtcol&sid=$sid\">TEXT COLORS</a> "; echo "<a href=\"index.php?action=linkcol&sid=$sid\">LINK COLORS</a> "; echo "<a href=\"index.php?action=bgcol&sid=$sid\">BACKGROUND COLORS</a> "; echo "<a href=\"index.php?action=hcol&sid=$sid\">HEADER COLORS</a> "; echo "<a href=\"index.php?action=rescol&sid=$sid\">RESET MY COLORS</a> "; echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo " "; echo "</body>"; } ///////////////////////////////////////////////color menu pick ///////////////////////////////////////////////////////////// else if ($action=="txtcol") { echo "<body>"; echo " **Select the text colour.
please don't pick one similar to your background.** ";
$query = "select * from xhtml_hex order by color"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $row = mysql_fetch_array($result);
while ($row) { $color = $row["color"]; $hex = $row["hex"];
if ($hex != "$trcol" && $hex != "$txtco" && $hex != "$meco" && $hex != "$bogc") { $hex = str_replace("#","","$hex"); echo " <a href="index.php?sid=$sid&hex=$hex&action=textset">$color</a> "; } $row = mysql_fetch_array($result); }
echo "
";
echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>
</body>"; } else if ($action=="textset") { $hex=$_GET["hex"]; echo "<body>"; echo ""; $ncl = mysql_query("UPDATE mad_users SET textcol='".$hex."' WHERE id='".$uid."'"); echo "Your New Site Text color Has Been Set. You Will See the changes when you return to the home page. "; echo " "; echo "
"; echo "<a href="home.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</body>"; } else if ($action=="linkcol") { echo "<body>"; echo "
**Select the Links colour.
please don't pick one similar to your background.** ";
$query = "select * from xhtml_hex order by color"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $row = mysql_fetch_array($result);
while ($row) { $color = $row["color"]; $hex = $row["hex"];
if ($hex != "$trcol" && $hex != "$txtco" && $hex != "$linkcol" && $hex != "$bogc") { $hex = str_replace("#","","$hex"); echo " <a href="index.php?sid=$sid&hex=$hex&action=linkset">$color</a> "; } $row = mysql_fetch_array($result); }
echo "
";
echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>
</body>"; } else if ($action=="linkset") { $hex=$_GET["hex"]; echo "<body>"; echo ""; $ncl = mysql_query("UPDATE mad_users SET linkcol='".$hex."' WHERE id='".$uid."'"); echo "Your New Site Link color Has Been Set. You Will See the changes when you return to the home page. "; echo " "; echo "
"; echo "<a href="home.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</body>"; } else if ($action=="hcol") { echo "<body>"; echo "
**Select The Page Heading colour.
please don't pick one similar to your background.** ";
$query = "select * from xhtml_hex order by color"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $row = mysql_fetch_array($result);
while ($row) { $color = $row["color"]; $hex = $row["hex"];
if ($hex != "$hcol" && $hex != "$txtcol" && $hex != "$linkcol" && $hex != "$bogc") { $hex = str_replace("#","","$hex"); echo " <a href="index.php?sid=$sid&hex=$hex&action=hset">$color</a> "; } $row = mysql_fetch_array($result); }
echo "
";
echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>
</body>"; } else if ($action=="hset") { $hex=$_GET["hex"]; echo "<body>"; echo ""; $ncl = mysql_query("UPDATE mad_users SET hcol='".$hex."' WHERE id='".$uid."'"); echo "Your New Site Link color Has Been Set. You Will See the changes when you return to the home page. "; echo " "; echo "
";
echo "<a href="home.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>";
echo "Home</a>";
echo "
";
echo "</body>";
}
else if ($action=="bgcol")
{
echo "<body>";
echo "
**select your background colour, please be aware that you might obscure some text colours when you do this, if it goes a bit west and no colour combination you choose looks right, if you can't see the links, please inform a owner and we'll reset your colours for you.**
"; $query = "select * from xhtml_hex order by color"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $row = mysql_fetch_array($result);
while ($row)
{ $color = $row["color"]; $hex = $row["hex"]; if ($hex != "$trcol" && $hex != "$txtco" && $hex != "$meco" && $hex != "$bogc") { $hex = str_replace("#","","$hex"); echo " <a href="index.php?sid=$sid&hex=$hex&action=bgcolorset">$color</a> "; } $row = mysql_fetch_array($result); }
echo "
";
echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>
</body>"; }else if ($action=="bgcolorset") { $hex=$_GET["hex"]; echo "<body>"; echo "
"; $ncl = mysql_query("UPDATE mad_users SET bgcol='".$hex."' WHERE id='".$uid."'"); echo "Your New Site Background color Has Been Set. You Will See the changes when you return to the home page. "; echo " "; echo "
"; echo "<a href="home.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</body>"; }
========================================== now add this code to your pages like this for eg:::
else if($action=="example") {
$who = $_GET["who"];
addonline(getuid_sid($sid),"checking boring crap lol","");
$bgcol2 = mysql_fetch_array(mysql_query("SELECT bgcol FROM mad_users WHERE id='".getuid_sid($sid)."'"));
$bgcol=$bgcol2[0]; $linkcol2 = mysql_fetch_array(mysql_query("SELECT linkcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $linkcol=$linkcol2[0]; $hcol2 = mysql_fetch_array(mysql_query("SELECT hcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $hcol=$hcol2[0]; $textcol2 = mysql_fetch_array(mysql_query("SELECT textcol FROM mad_users WHERE id='".getuid_sid($sid)."'")); $textcol=$textcol2[0];
echo "
<style type=\"text/css\"> <!-- body { color: #$textcol; background-color: #$bgcol; text-align: center; } a:link { color: #$linkcol; } a:visited { color: #$linkcol; } .form-container { text-align: center; } h1 { font-size: medium; background-color: #$hcol; color: #textcol; --> </style> </head>"; echo "<body>"; echo " "; $whnick = getnick_uid($who); echo "**$whnick**"; echo "<h1 align=\"center\">www.madfonez.com</h1>\n"; echo " "; echo "</body>"; }ps :/// dont forget to change where mad_users to ibwf_users etc lol and yess peeeps i was the first to get this working External image (may be gone)
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***