Change Writing Colour

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    [cody]
    $text = preg_replace("/\[run\](.*?)\[\/run\]/i","<marquee direction="left">\\1</marquee>", $text);
    [/code]
    BBcode by me, running txt,
    [run][/run]

    Click here!!!

    Comment


      #17
      Code:
      $text = preg_replace("/\[run\](.*?)\[\/run\]/i","<marquee direction=\"left\">\\1</marquee>", $text);
      Here we go, running txt

      Click here!!!

      Comment


        #18
        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 &#39;#000000&#39;,
        `linkcol` varchar(7) NOT NULL default &#39;#FF4500&#39;,
        `textcol` varchar(7) NOT NULL default &#39;#FFD700&#39;,
        `hcol` varchar(7) NOT NULL default &#39;#DC143C&#39;,


        ================================================== =====
        now make this as a sepparate table

        --
        -- Table structure for table `xhtml_hex`
        --

        CREATE TABLE `xhtml_hex` (
        `color` varchar(20) NOT NULL default &#39;&#39;,
        `hex` varchar(7) NOT NULL default &#39;&#39;
        ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

        --
        -- Dumping data for table `xhtml_hex`
        --

        INSERT INTO `xhtml_hex` VALUES(&#39;blue&#39;, &#39;#0000FF&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;black&#39;, &#39;#000000&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;brown&#39;, &#39;#A52A2A&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;crap blue&#39;, &#39;#5F9EA0&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;chocolate&#39;, &#39;#D2691E&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;cornflower blue&#39;, &#39;#6495ED&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;crimson&#39;, &#39;#DC143C&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;cyan&#39;, &#39;#00FFFF&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;violent&#39;, &#39;#00008B&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;something&#39;, &#39;#B8860B&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;dark gray&#39;, &#39;#A9A9A9&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;khaki&#39;, &#39;#BDB76B&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;orange order&#39;, &#39;#FF8C00&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;woman scorned&#39;, &#39;#8B0000&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;fish paste&#39;, &#39;#E9967A&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;seaweed&#39;, &#39;#8FBC8F&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;slate blue&#39;, &#39;#483D8B&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;violet&#39;, &#39;#9400D3&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;pink&#39;, &#39;#FF1493&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;sky blue&#39;, &#39;#00BFFF&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;bricks&#39;, &#39;#B22222&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;trees n ****&#39;, &#39;#228B22&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;grannys house&#39;, &#39;#DCDCDC&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;going for gold&#39;, &#39;#FFD700&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;orange peel&#39;, &#39;#DAA520&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;green&#39;, &#39;#008000&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;flamingos&#39;, &#39;#FF69B4&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;indigo&#39;, &#39;#4B0082&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;grass&#39;, &#39;#7CFC00&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;marooned&#39;, &#39;#800000&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;blue two&#39;, &#39;#0000CD&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;purple&#39;, &#39;#9370D8&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;minty&#39;, &#39;#00FA9A&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;midnight&#39;, &#39;#191970&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;red&#39;, &#39;#FF4500&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;sand&#39;, &#39;#F4A460&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;silver&#39;, &#39;#C0C0C0&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;yellow&#39;, &#39;#FFFF00&#39;);
        INSERT INTO `xhtml_hex` VALUES(&#39;white&#39;, &#39;#FFFFFF&#39;);


        ==================================
        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=&#39;".getuid_sid($sid)."&#39;"));
        $bgcol=$bgcol2[0];
        $linkcol2 = mysql_fetch_array(mysql_query("SELECT linkcol FROM mad_users WHERE id=&#39;".getuid_sid($sid)."&#39;"));
        $linkcol=$linkcol2[0];
        $hcol2 = mysql_fetch_array(mysql_query("SELECT hcol FROM mad_users WHERE id=&#39;".getuid_sid($sid)."&#39;"));
        $hcol=$hcol2[0];
        $textcol2 = mysql_fetch_array(mysql_query("SELECT textcol FROM mad_users WHERE id=&#39;".getuid_sid($sid)."&#39;"));
        $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 "<p align=\"center\">";
        echo "Colors Menu";
        echo "</p>";
        echo "<p align=\"center\">";
        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&amp;sid=$sid\">TEXT COLORS</a>
        ";
        echo "<a href=\"index.php?action=linkcol&amp;sid=$sid\">LIN K COLORS</a>
        ";
        echo "<a href=\"index.php?action=bgcol&amp;sid=$sid\">BACKG ROUND COLORS</a>
        ";
        echo "<a href=\"index.php?action=hcol&amp;sid=$sid\">HEADER COLORS</a>
        ";
        echo "<a href=\"index.php?action=rescol&amp;sid=$sid\">RESE T MY COLORS</a>
        ";
        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</body>";
        }
        ///////////////////////////////////////////////color menu pick
        /////////////////////////////////////////////////////////////
        else if ($action=="txtcol")
        {
        echo "<body>";
        echo "


        Select the text colour.
        please don&#39;t pick one similar to your background.
        </p>";

        $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 "<p align=\"center\" style=\"background-color: #$hex;\"><a href=\"index.php?sid=$sid&amp;hex=$hex&amp;action= textset\">$color</a></p>";
        }
        $row = mysql_fetch_array($result);
        }

        echo "

        ";

        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a></p></body>";
        }
        else if ($action=="textset")
        {
        $hex=$_GET["hex"];
        echo "<body>";
        echo "

        ";
        $ncl = mysql_query("UPDATE mad_users SET textcol=&#39;".$hex."&#39; WHERE id=&#39;".$uid."&#39;");
        echo "Your New Site Text color Has Been Set. You Will See the changes when you return to the home page.
        ";
        echo "</p>";
        echo "

        ";
        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</body>";
        }
        else if ($action=="linkcol")
        {
        echo "<body>";
        echo "


        Select the Links colour.
        please don&#39;t pick one similar to your background.
        </p>";

        $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 "<p align=\"center\" style=\"background-color: #$hex;\"><a href=\"index.php?sid=$sid&amp;hex=$hex&amp;action= linkset\">$color</a></p>";
        }
        $row = mysql_fetch_array($result);
        }

        echo "

        ";

        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a></p></body>";
        }
        else if ($action=="linkset")
        {
        $hex=$_GET["hex"];
        echo "<body>";
        echo "

        ";
        $ncl = mysql_query("UPDATE mad_users SET linkcol=&#39;".$hex."&#39; WHERE id=&#39;".$uid."&#39;");
        echo "Your New Site Link color Has Been Set. You Will See the changes when you return to the home page.
        ";
        echo "</p>";
        echo "

        ";
        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</body>";
        }
        else if ($action=="hcol")
        {
        echo "<body>";
        echo "


        Select The Page Heading colour.
        please don&#39;t pick one similar to your background.
        </p>";

        $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 "<p align=\"center\" style=\"background-color: #$hex;\"><a href=\"index.php?sid=$sid&amp;hex=$hex&amp;action= hset\">$color</a></p>";
        }
        $row = mysql_fetch_array($result);
        }

        echo "

        ";

        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a></p></body>";
        }
        else if ($action=="hset")
        {
        $hex=$_GET["hex"];
        echo "<body>";
        echo "

        ";
        $ncl = mysql_query("UPDATE mad_users SET hcol=&#39;".$hex."&#39; WHERE id=&#39;".$uid."&#39;");
        echo "Your New Site Link color Has Been Set. You Will See the changes when you return to the home page.
        ";
        echo "</p>";
        echo "

        ";
        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        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&#39;t see the links, please inform a owner and we&#39;ll reset your colours for you.</p>";
        $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 "<p align=\"center\" style=\"background-color: #$hex;\"><a href=\"index.php?sid=$sid&amp;hex=$hex&amp;action= bgcolorset\">$color</a></p>";
        }
        $row = mysql_fetch_array($result);
        }

        echo "

        ";

        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a></p></body>";
        }

        else if ($action=="bgcolorset")
        {
        $hex=$_GET["hex"];
        echo "<body>";
        echo "

        ";
        $ncl = mysql_query("UPDATE mad_users SET bgcol=&#39;".$hex."&#39; WHERE id=&#39;".$uid."&#39;");
        echo "Your New Site Background color Has Been Set. You Will See the changes when you return to the home page.
        ";
        echo "</p>";
        echo "

        ";
        echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        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=&#39;".getuid_sid($sid)."&#39;"));
        $bgcol=$bgcol2[0];
        $linkcol2 = mysql_fetch_array(mysql_query("SELECT linkcol FROM mad_users WHERE id=&#39;".getuid_sid($sid)."&#39;"));
        $linkcol=$linkcol2[0];
        $hcol2 = mysql_fetch_array(mysql_query("SELECT hcol FROM mad_users WHERE id=&#39;".getuid_sid($sid)."&#39;"));
        $hcol=$hcol2[0];
        $textcol2 = mysql_fetch_array(mysql_query("SELECT textcol FROM mad_users WHERE id=&#39;".getuid_sid($sid)."&#39;"));
        $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 "<p align=\"center\">";
        $whnick = getnick_uid($who);
        echo "$whnick";
        echo "<div class=\"pageName\"><h1 align=\"center\">www.madfonez.com</h1></div>\n";
        echo "</p>";
        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









        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

        Comment

        Working...
        X