Help With Adding Themes In Lavalair.

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

    Help With Adding Themes In Lavalair.

    I need help in adding themes (CSS) in the lavalair xhtml version. What i did was....
    Added this code in index.php....
    Code:
    else if($action=="css")
    {
      addonline(getuid_sid($sid),"Updating StyleSheet!","");
        echo "<div align=&#39;center&#39;>
    ";
        echo "[b][u]StyleSheet[/u][/b]
    
    ";
        echo "<form action=\"genproc.php?action=css\" method=\"get\">";
            echo "View: <select name=\"thms\">";
      echo "<option value=\"1\">1</option>";
      echo "<option value=\"2\">2</option>";
      echo "<option value=\"3\">3</option>";
        echo "</select>";
    
        
    echo "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
    echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
    echo "<input type=\"submit\" value=\"GO\"/>";
    echo "</form>";
    }
    Added this in genproc.php...
    Code:
    else if($action=="css")
    {
        addonline(getuid_sid($sid),"Selecting StyleSheet","");
        $thms = $_GET["thms"];
      echo "<div align=\"center\">";
      $uid = getuid_sid($sid);
      $res = mysql_query("UPDATE fun_users SET css=&#39;".$thms."&#39; WHERE id=&#39;".$uid."&#39;");
      if($res)
      {
        echo "<img src=\"images/ok.gif\" alt=\"o\"/>Style Selected successfully!
    ";
      }else{
        echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error Selecting Style!
    ";
      }
        if ($thms==&#39;1&#39;)
            { echo "[b]Sheet 1 selected[/b]";
            }
        else if ($thms==&#39;2&#39;)
            { echo "[b]Sheet 2 selected[/b]";
            }
        else if ($thms==&#39;3&#39;)
            { echo "[b]Sheet 3 selected[/b]";
            }
        else  {
                    echo "[b]ERROR!!![/b]";
                    }
                
      echo "
    <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
      echo "</div>";
    }

    And finally added this on top of index.php......
    Code:
    echo "<head>";
        echo "<title>$stitle</title>";
        
          $style=mysql_query("SELECT css FROM fun_users WHERE id=&#39;".$uid."&#39;");
            
        if ($style[0]==&#39;1&#39;)
          {
        echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
        }
        else if ($style[0]==&#39;2&#39;)
        {
        echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style2.css\" />";    
        }
        else if ($style[0]==&#39;3&#39;)
        {
        echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style3.css\" />";    
        }
        else 
        {
        echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
        }
    
        echo "</head>";
    But its not working, its showing the default theme....... Can anyone tell me whats wrong where????/
    Thanx.

    #2
    I need help in adding themes (CSS) in the lavalair xhtml version. What i did was....
    Added this code in index.php....


    else if($action=="css")
    {
    addonline(getuid_sid($sid),"Updating StyleSheet!","");
    echo "<div align=&#39;center&#39;>
    ";
    echo "StyleSheet

    ";
    echo "<form action=\"genproc.php?action=css&sid=$sid\" method=\"post\">";
    echo "View: <select name=\"thms\">";
    echo "<option value=\"1\">1</option>";
    echo "<option value=\"2\">2</option>";
    echo "<option value=\"3\">3</option>";
    echo "</select>";


    REMOVE THIS: echo "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
    echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
    echo "<input type=\"submit\" value=\"GO\"/>";
    echo "</form>";
    }



    Added this in genproc.php...
    [code]else if($action=="css")
    {
    addonline(getuid_sid($sid),"Selecting StyleSheet","");
    $thms = $_POST["thms"];
    echo "<div align=\"center\">";
    $uid = getuid_sid($sid);
    $res = mysql_query("UPDATE fun_users SET css=&#39;".$thms."&#39; WHERE id=&#39;".$uid."&#39;");
    if($res)
    {
    echo "<img src=\"images/ok.gif\" alt=\"o\"/>Style Selected successfully!
    ";
    }else{
    echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error Selecting Style!
    ";
    }
    if ($thms==&#39;1&#39;)
    { echo "Sheet 1 selected";
    }
    else if ($thms==&#39;2&#39;)
    { echo "Sheet 2 selected";
    }
    else if ($thms==&#39;3&#39;)
    { echo "Sheet 3 selected";
    }
    else {
    echo "ERROR!!!";
    }

    echo "
    <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "
    ";
    }[/b][/quote]


    This is how i did mine. Hope it works!

    Comment


      #3
      Thanx will try and post the results...

      Comment


        #4
        Hey Methos i did what u said, but its still the same... dunno where i am missing out..

        Comment


          #5
          Code:
          echo "</div>"; [error]
          Code:
          echo "</body";
          echo "</html>";
          exit();
          }
          exit(); close door off script no other may past this point
          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
          Visit: WapMasterz Coming Back Soon!
          _______
          SCRIPTS FOR SALE BY SUBZERO
          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment


            #6
            should i remove this line??
            Code:
            echo "</div>"; [error]
            And add exit(); at the bottom?

            Comment


              #7
              any script must a good head

              Code:
              <?php
              echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
              echo "
              <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
              "http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">
              <html xmlns=\"http://www.w3.org/1999/xhtml\">
              ";
              echo "<head>";
              <style>
                 span { font-size: 11pt; font-family: arial; color: red; font-weight: bold }
                 p { font-size: 11pt; font-family: arial; color: red; font-weight: bold }
                 select { font-size: 11pt; font-family: arial; color: red; }
                 a { font-size: 11pt; font-family: arial; color: navy; font-weight: bold }
                 td { font-size: 11pt; font-family: arial; color: brown; font-weight: normal;}
              </style> 
              <body bgcolor=black>
              ?>
              Code:
              <title>SITE NAME ??</title></head>
              -----
              blah your stuff here

              -----

              Code:
              echo "</body";
              echo "</html>";
              exit();
              }
              thats xhtml format
              Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
              Visit: WapMasterz Coming Back Soon!
              _______
              SCRIPTS FOR SALE BY SUBZERO
              Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
              FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
              _______
              Info & Tips
              php.net
              w3schools.com

              Comment


                #8
                try the index no need to chane all title only add </head>

                and </body>

                more better and saver add </body></html> exit(); etc etc


                demo: http://grim-reaper.ws/web/
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #9
                  haha sub i already have all that, i only posted the main code as that was needed only. lol havnt posted the whole index.php its complete with headers and closing tags etc...

                  Comment


                    #10
                    WAHEY!!! I DID IT! Thanx everyone who tried to help. BTW the only line i was missing was
                    Code:
                    $uid = getuid_sid($sid);
                    on the top. Just added that and it worked!!!

                    Comment


                      #11
                      WAHEY!!! I DID IT! Thanx everyone who tried to help. BTW the only line i was missing was
                      Code:
                      $uid = getuid_sid($sid);
                      on the top. Just added that and it worked!!! [/b]
                      does this need sql table? if yes pls post it..

                      Comment


                        #12
                        good for yall. i&#39;m still yet to get the site started!

                        Comment


                          #13
                          this is a file i just now created to share it with a friend, i see you guys also discussing about the same thing here, so i desided to share the whole thing here..


                          <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php


                          include("config.php");
                          include("core.php");

                          header("Content-type: text/vnd.wap.wml");
                          header("Cache-Control: no-store, no-cache, must-revalidate");
                          echo("<?xml version=\"1.0\"?>");
                          echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

                          $brws = explode(" ",$HTTP_USER_AGENT);
                          $ubr = $brws[0];
                          $uip = getip();
                          $action = $_GET["action"];
                          $sid = $_GET["sid"];
                          $who = $_GET["who"];

                          $uid = getuid_sid($sid);

                          ?>

                          <wml>
                          <?php



                          /*
                          Just add themes from AdminCP, this all content is of &#39;Personal Wap Site&#39;
                          i have used the same codings, now what you have to do is just copy and paste the following header codes
                          to all your xhtml pages.
                          */

                          /*From here

                          header("Content-type: text/html; charset=ISO-8859-1");
                          echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
                          echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"
                          \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";


                          include("config.php");
                          include("core.php");
                          connectdb();
                          $action=$_GET["action"];
                          $id=$_GET["id"];
                          $sid = $_GET["sid"];
                          $rid=$_GET["rid"];
                          $rpw=$_GET["rpw"];
                          $brws = explode(" ",$HTTP_USER_AGENT);
                          $ubr = $brws[0];
                          $uip = getip();
                          $who = $_GET["who"];

                          $uid = getuid_sid($sid);

                          echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
                          echo "<head>\n";
                          echo "<meta http-equiv=\"Cache-Control\" content=\"max-age=0\">\n";

                          $thid = mysql_fetch_array(mysql_query("SELECT thid FROM ibwf_mypage WHERE uid=&#39;".$uid."&#39;"));
                          if($thid[0]==""||$thid[0]==0)$thid[0]=1;
                          $thinfo = mysql_fetch_array(mysql_query("SELECT bgc, txc, lnk, hdc, hbg FROM ibwf_themes WHERE id=&#39;".$thid[0]."&#39;"));
                          echo "<style type=\"text/css\">";
                          echo "body {background-color:#$thinfo[0]; color:#$thinfo[1]}";
                          echo "h3 {background-color:#$thinfo[4]; color:#$thinfo[3]}";
                          echo "a:link {color:#$thinfo[2]}";
                          echo "a:visited {color:#$thinfo[2]}";
                          echo "</style>";

                          echo "</head>\n";
                          echo "<body>\n";
                          */
                          ///////////////////////////////////////////////////////////////////////
                          JUST UPTO here!!!!!!


                          // upload this whole file to server and link it. this is used to change themes.. name it anything.php



                          addonline(getuid_sid($sid),"Changing Themes","");
                          echo "<p align=\"center\">";
                          echo " Select any theme, this will change the whole colours of the site.
                          ";
                          echo "<select name=\"thms\">";
                          $themes = mysql_query("SELECT id, name FROM ibwf_themes");
                          while ($theme = mysql_fetch_array($themes))
                          {
                          echo "<option value=\"$theme[0]\">".htmlspecialchars($theme[1])."</option>";
                          }
                          echo "</select>
                          ";
                          echo "<anchor>Update";
                          echo "<go href=\"genproc.php?action=pws&sid=$sid\" method=\"post\">";
                          echo "<postfield name=\"thms\" value=\"$(thms)\"/>";
                          echo "</go></anchor>";
                          echo "

                          ";
                          echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
                          echo "Home</a>";
                          echo "</p>";
                          //
                          //to be frank i have no idea of codings, this is not my coding, all credit goes to IrisBlaze!
                          //i have edited codes prprerly so it can be used on all pages. Hope this would be useful
                          // to all wapmasters to make their site look something new n unique.
                          // if you do any further updates Please do send me at ( sanghya.sagar@gmail.com )
                          // to see a demo of this visit my chatrooms at ( http://chat.wapside.net/chat )
                          // Oh you can also download the chat.php which i have edited with this themes at
                          // ( http://chat.wapside.net/chat/chat.zip )
                          ?>
                          </wml></div> very easy ne? hehe.. this took me almost months to do this, any questions ask me through Email or pm me (sagar3) at my site http://chat.wapside.net/chat

                          Comment


                            #14
                            huhh!! if confused? just download this file which i did and see it yourselves http://chat.wapside.net/chat/chat.zip

                            Comment


                              #15
                              I need help in adding themes (CSS) in the lavalair xhtml version. What i did was....
                              Added this code in index.php....
                              Code:
                              else if($action=="css")
                              {
                                addonline(getuid_sid($sid),"Updating StyleSheet!","");
                                  echo "<div align=&#39;center&#39;>
                              ";
                                  echo "[b][u]StyleSheet[/u][/b]
                              
                              ";
                                  echo "<form action=\"genproc.php?action=css\" method=\"get\">";
                                      echo "View: <select name=\"thms\">";
                                echo "<option value=\"1\">1</option>";
                                echo "<option value=\"2\">2</option>";
                                echo "<option value=\"3\">3</option>";
                                  echo "</select>";
                              
                                  
                              echo "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                              echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
                              echo "<input type=\"submit\" value=\"GO\"/>";
                              echo "</form>";
                              }
                              Added this in genproc.php...
                              Code:
                              else if($action=="css")
                              {
                                  addonline(getuid_sid($sid),"Selecting StyleSheet","");
                                  $thms = $_GET["thms"];
                                echo "<div align=\"center\">";
                                $uid = getuid_sid($sid);
                                $res = mysql_query("UPDATE fun_users SET css=&#39;".$thms."&#39; WHERE id=&#39;".$uid."&#39;");
                                if($res)
                                {
                                  echo "<img src=\"images/ok.gif\" alt=\"o\"/>Style Selected successfully!
                              ";
                                }else{
                                  echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error Selecting Style!
                              ";
                                }
                                  if ($thms==&#39;1&#39;)
                                      { echo "[b]Sheet 1 selected[/b]";
                                      }
                                  else if ($thms==&#39;2&#39;)
                                      { echo "[b]Sheet 2 selected[/b]";
                                      }
                                  else if ($thms==&#39;3&#39;)
                                      { echo "[b]Sheet 3 selected[/b]";
                                      }
                                  else  {
                                              echo "[b]ERROR!!![/b]";
                                              }
                                          
                                echo "
                              <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
                              echo "Home</a>";
                                echo "</div>";
                              }
                              And finally added this on top of index.php......
                              Code:
                              echo "<head>";
                                  echo "<title>$stitle</title>";
                                  
                                    $style=mysql_query("SELECT css FROM fun_users WHERE id=&#39;".$uid."&#39;");
                                      
                                  if ($style[0]==&#39;1&#39;)
                                    {
                                  echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
                                  }
                                  else if ($style[0]==&#39;2&#39;)
                                  {
                                  echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style2.css\" />";    
                                  }
                                  else if ($style[0]==&#39;3&#39;)
                                  {
                                  echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style3.css\" />";    
                                  }
                                  else 
                                  {
                                  echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
                                  }
                              
                                  echo "</head>";
                              But its not working, its showing the default theme....... Can anyone tell me whats wrong where????/
                              Thanx.[/b]

                              need sql table for this script

                              Comment

                              Working...
                              X