Wapdesire Prob

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

    Wapdesire Prob

    Im trying to increase the length of the online list moods, ive edited the mood set and DB as needed and its writing the full mood to the database just fine, however for some reason its only displaying the first 38 characters, i dont see anywhere in the coding that limits it to this number... Anyone have any ideas please?
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="online")
    {
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"Online List ($mmsg)","index.php?action=online");
    echo "<head>";
    echo "<title>Online List</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    //echo "<div><img src=\"../images/onlinelist.gif\" alt=\"Online List\"/></div>";
    echo popup($sid);
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $num_items = getnumonline(); //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    //changable sql
    $sql = "SELECT
    a.name,a.perm, b.place, b.userid FROM ibwf_users a
    INNER JOIN ibwf_online b ON a.id = b.userid
    GROUP BY 1,2
    LIMIT $limit_start, $items_per_page
    ";
    echo "<p align=\"center\">";
    $items = mysql_query($sql);
    echo mysql_error();
    while ($item = mysql_fetch_array($items))
    {
    if($item[1]==&#39;0&#39;)
    {
    $tit = "<img src=\"../images/member.gif\" alt=\"*\"/>";
    }if($item[1]==&#39;1&#39;)
    {
    $tit = "<img src=\"../images/moderator.gif\" alt=\"*\"/>";
    }if($item[1]==&#39;2&#39;)
    {
    $tit = "<img src=\"../images/admin.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;3&#39;)
    {
    $tit = "<img src=\"../images/head.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;4&#39;)
    {
    $tit = "<img src=\"../images/owner.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;5&#39;)
    {
    $tit = "<img src=\"../images/tech.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;6&#39;)
    {
    $tit = "<img src=\"../images/host.gif\" alt=\"*\"/>";
    }

    $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name=&#39;$item[0]&#39;"));
    if($sex[0]=="M"){$usersex = "<img src=\"../images/male.gif\" alt=\"(M)\"/>";}
    if($sex[0]=="F"){$usersex = "<img src=\"../images/female.gif\" alt=\"(F)\"/>";}
    if($sex[0]==""){$usersex = "";}
    $text = parsepm($item[2], $sid);
    if($item[1]>&#39;0&#39;)
    {
    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit
    $usersex
    </a>
    ";
    }else{
    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit
    $usersex
    </a>
    ";
    }

    echo "$lnk $text
    ";
    }
    //echo "</p>";
    //echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"index.php?action=online&amp;page=$ppage&amp ;sid=$sid\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"index.php?action=online&amp;page=$npage&amp ;sid=$sid\">Next»</a>";
    }
    echo "
    $page/$num_pages";
    if($num_pages>2)
    {
    echo getjumper($action, $sid,"index");
    }
    echo "</p>";</div>

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function getsetmood($uid)
    {
    $getdata = mysql_fetch_array(mysql_query("SELECT setmood FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    return $getdata[0];
    $text = getsmilies($text);
    }</div>
    :p:p:p

    #2
    dont use get function

    Code:
    else if($action=="online")
    {
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"Online List ($mmsg)","index.php?action=online");
    echo "<head>";
    echo "<title>Online List</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    //echo "<div><img src=\"../images/onlinelist.gif\" alt=\"Online List\"/></div>";
    echo popup($sid);
    //////ALL LISTS SCRIPT <<
    
    if($page=="" || $page<=0)$page=1;
    $num_items = getnumonline(); //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;
    
    //changable sql
    $sql = "SELECT
    a.name,a.perm, b.place, b.userid, a.setmood FROM ibwf_users a
    INNER JOIN ibwf_online b ON a.id = b.userid
    GROUP BY 1,2
    LIMIT $limit_start, $items_per_page
    ";
    echo "<p align=\"center\">";
    $items = mysql_query($sql);
    echo mysql_error();
    while ($item = mysql_fetch_array($items))
    {
    if($item[1]==&#39;0&#39;)
    {
    $tit = "<img src=\"../images/member.gif\" alt=\"*\"/>";
    }if($item[1]==&#39;1&#39;)
    {
    $tit = "<img src=\"../images/moderator.gif\" alt=\"*\"/>";
    }if($item[1]==&#39;2&#39;)
    {
    $tit = "<img src=\"../images/admin.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;3&#39;)
    {
    $tit = "<img src=\"../images/head.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;4&#39;)
    {
    $tit = "<img src=\"../images/owner.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;5&#39;)
    {
    $tit = "<img src=\"../images/tech.gif\" alt=\"*\"/>";
    } if($item[1]==&#39;6&#39;)
    {
    $tit = "<img src=\"../images/host.gif\" alt=\"*\"/>";
    }
    
    $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name=&#39;$item[0]&#39;"));
    if($sex[0]=="M"){$usersex = "<img src=\"../images/male.gif\" alt=\"(M)\"/>";}
    if($sex[0]=="F"){$usersex = "<img src=\"../images/female.gif\" alt=\"(F)\"/>";}
    if($sex[0]==""){$usersex = "";}
    $mood=$item[2];
    if($item[1]>&#39;0&#39;)
    {
    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit
    $usersex
    </a>
    ";
    }else{
    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit
    $usersex
    </a>
    ";
    }
    
    echo "$lnk $mood 
    ";
    }
    //echo "</p>";
    //echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"index.php?action=online&amp;page=$ppage&amp;sid=$sid\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">Next»</a>";
    }
    echo "
    $page/$num_pages";
    if($num_pages>2)
    {
    echo getjumper($action, $sid,"index");
    }
    echo "</p>";

    whats the database? and the input form ?
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      input form
      <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="mood")
      {
      echo "<head>";
      echo "<title>Set OnlineList Mood</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
      $uid = getuid_sid($sid);
      echo "<form action=\"genproc.php?action=upmood&amp;sid=$sid\" method=\"post\">";
      echo "SET MOOD TO:
      <input name=\"mmsg\" maxlength=\"200\"/>
      ";
      echo "<input type=\"Submit\" name=\"submit\" Value=\"Submit\"></form>";
      echo "</p>";
      echo "<p align=\"center\">";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
      }</div>

      genproc
      <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="upmood")
      {
      addonline(getuid_sid($sid),"Updating My Mood","");
      $mmsg = $_POST["mmsg"];

      echo "<head>";
      echo "<title>Set OnlineList Mood</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      $res = mysql_query("UPDATE ibwf_users SET setmood=&#39;".$mmsg."&#39; WHERE id=&#39;".$uid."&#39;");
      if($res)
      {
      echo "<img src=\"images/ok.gif\" alt=\"o\"/>Mood updated successfully
      ";
      }else{
      echo "<img src=\"images/notok.gif\" alt=\"x\"/>Can&#39;t update your Mood
      ";
      }
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
      }</div>


      sql
      <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>-- Table structure for table `ibwf_users`
      --

      CREATE TABLE IF NOT EXISTS `ibwf_users` (
      `id` int(100) NOT NULL auto_increment,
      `name` varchar(30) NOT NULL default &#39;&#39;,
      `pass` varchar(60) NOT NULL default &#39;&#39;,
      `birthday` varchar(50) NOT NULL default &#39;&#39;,
      `sex` char(1) NOT NULL default &#39;&#39;,
      `location` varchar(100) NOT NULL default &#39;&#39;,
      `perm` char(1) NOT NULL default &#39;0&#39;,
      `posts` int(100) NOT NULL default &#39;0&#39;,
      `plusses` int(100) NOT NULL default &#39;700&#39;,
      `signature` varchar(100) NOT NULL default &#39;&#39;,
      `avatar` varchar(100) NOT NULL default &#39;&#39;,
      `email` varchar(50) NOT NULL default &#39;&#39;,
      `browserm` varchar(50) NOT NULL default &#39;&#39;,
      `ipadd` varchar(30) NOT NULL default &#39;&#39;,
      `lastact` int(100) NOT NULL default &#39;0&#39;,
      `regdate` int(100) NOT NULL default &#39;0&#39;,
      `chmsgs` int(100) NOT NULL default &#39;0&#39;,
      `chmood` int(100) NOT NULL default &#39;0&#39;,
      `shield` char(1) NOT NULL default &#39;0&#39;,
      `gplus` int(100) NOT NULL default &#39;700&#39;,
      `budmsg` varchar(100) NOT NULL default &#39;&#39;,
      `lastpnreas` varchar(100) NOT NULL default &#39;&#39;,
      `lastplreas` varchar(100) NOT NULL default &#39;&#39;,
      `shouts` int(100) NOT NULL default &#39;0&#39;,
      `pollid` int(100) NOT NULL default &#39;0&#39;,
      `rbcid` varchar(255) NOT NULL default &#39;&#39;,
      `hvia` char(1) NOT NULL default &#39;1&#39;,
      `lastvst` int(100) NOT NULL default &#39;0&#39;,
      `battlep` int(100) NOT NULL default &#39;700&#39;,
      `popmsg` char(1) NOT NULL default &#39;1&#39;,
      `automsgs` char(1) NOT NULL default &#39;1&#39;,
      `validated` char(1) NOT NULL default &#39;0&#39;,
      `theme` varchar(100) NOT NULL default &#39;white_medium.css&#39;,
      `hidden` char(1) NOT NULL default &#39;0&#39;,
      `quiz_score` varchar(20) NOT NULL default &#39;0&#39;,
      `quiz_easy` char(3) NOT NULL default &#39;no&#39;,
      `quiz_medium` char(3) NOT NULL default &#39;no&#39;,
      `quiz_hard` char(3) NOT NULL default &#39;no&#39;,
      `total_score` varchar(10) NOT NULL default &#39;0&#39;,
      `setmood` varchar(200) NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `name` (`name`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;</div>
      :p:p:p

      Comment


        #4
        theres your error

        $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));

        addonline(getuid_sid($sid),"Online List ($mmsg)","index.php?action=online");


        your adding the mood into the ibwf_users location sql
        which aint gonna work :P

        Comment


          #5
          my moods are working just fine, i just want them longer
          :p:p:p

          Comment


            #6
            The reason that they are short is because of the reason iv posted above.
            your trying to put your setmood into your location sql

            you could increase your

            `location` varchar(100) NOT NULL default &#39;&#39;,

            to

            `location` varchar(255) NOT NULL default &#39;&#39;,

            that would give you a little more space or you could code it a lot better way :P

            Comment


              #7
              tried that already, it&#39;s set to 200, and it saves all 200 chars when you set mood, it just wont display it all
              :p:p:p

              Comment


                #8
                <div class='quotetop'>QUOTE (darkdesire @ Dec 22 2008, 03:20 PM) <{POST_SNAPBACK}></div>
                tried that already, it&#39;s set to 200, and it saves all 200 chars when you set mood, it just wont display it all[/b]
                you want to display only 38 characters? am i right your plan is to show only 38 character out of the 200 characters saved at the sql???????
                Services

                Are you looking to take your wap or wapsite to a higher level? Do you want to stand out and rise above your competitors?

                Below is a list of services I offer:

                Wap Design and Customized Coding -The first way to stand out in a crowd is to have a brilliant and unique design for your wap or wapsite.

                Rates

                General consulting – My current hourly rate is $100 / hour.
                Custom Wapsite Community - My current rate is $500 / Wap Community Development.

                Comment


                  #9
                  you have set your
                  setmood to 200 character spacing
                  set your location to 255

                  `location` varchar(255) NOT NULL default &#39;&#39;,

                  the error you have made why your only getting 38 spaces is because you have got your setmood sql going into your location sql

                  (this is your coding below----- error is in bold)

                  $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));

                  addonline(getuid_sid($sid),"Online List ($mmsg)","index.php?action=online");

                  Comment


                    #10
                    or the better way to sort it out would be to change

                    $mood=$item[2];

                    to

                    $mood = "$item[2] ($item[4])";

                    and change your

                    addonline(getuid_sid($sid),"Online List ($mmsg)","index.php?action=online");

                    back to

                    addonline(getuid_sid($sid),"Online List ","index.php?action=online");

                    Comment


                      #11
                      no inet, the problem is that it is only showing 38 characters of the 200 in the database, id like it to show all 200 but this one has beat me lol
                      :p:p:p

                      Comment


                        #12
                        use this instead . saves u loads of coding

                        Code:
                        //////////////////////////////////////////Update online msg & mood
                        else if($action=="mood")
                        {
                        addonline(getuid_sid($sid),"Updating online msg &amp; mood","");
                        
                        echo "<head>";
                            echo "<title>Online List</title>";
                            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                            echo "</head>";
                        echo"<body>";
                        echo "
                        
                        ";
                        
                        
                        echo "<form action=\"index.php?action=upolm&sid=$sid\" method=\"post\">";
                        echo "Mood msg: <input name=\"kiss\" maxlength=\"100\"/>
                        ";
                        
                        echo "<input type=\"Submit\" name=\"submit\" Value=\"Submit\"></form>";
                        
                        echo "
                        
                        ";
                        echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
                        echo "Home</a>
                        ";
                        
                        echo "</p>";
                        echo "</body>";
                        }
                        //////////////////////////////////////////Update online msg & mood
                        else if($action=="upolm")
                        {
                        addonline(getuid_sid($sid),"Updating online msg &amp; mood","");
                        
                        echo "<head>";
                            echo "<title>Online List</title>";
                            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                            echo "</head>";
                        echo"<body>";
                        $kiss = $_POST["kiss"];
                        
                        echo "<p align=\"center\">";
                        $res = mysql_query("UPDATE ibwf_users SET onlinemsg=&#39;".$kiss."&#39; WHERE id=&#39;".$uid."&#39;");
                          if($res)
                          {
                            echo "<img src=\"images/ok.gif\" alt=\"o\"/>Your online msg was updated successfully
                        ";
                          }else{
                            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error updating your online msg
                        ";
                          }
                        echo "
                        <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
                        echo "Home</a>
                        ";
                        
                        echo "</p></body>";
                        }
                        usage : echo "<a href=\"index.php?action=mood&amp;sid=$sid\">Update Online Mood</a>
                        ";

                        replace below
                        //changable sql
                        $sql = "SELECT
                        a.name,a.perm, b.place, b.userid,a.onlinemsg FROM ibwf_users a
                        INNER JOIN ibwf_online b ON a.id = b.userid
                        GROUP BY 1,2
                        LIMIT $limit_start, $items_per_page

                        in online users function

                        add row in ibwf_users onlinemsg varchar ??? wotever u want it to be lol .

                        if i have forgot anything for this am sure u will let me know pmpl .
                        Wapchat4u


                        Topsites4u

                        Comment


                          #13
                          that aint gonna help him as he is not using $item[4] of the sql
                          so if its called setmood or onlinemsg it still isnt going to work

                          Comment


                            #14
                            but theres no need to add
                            the htlmchararcters (getsetmood) blah blah blah ) in every page with that .far too much coding using wot u got jamie as i used it to start of with .
                            thats the code i use now . and am sure most others do too
                            Wapchat4u


                            Topsites4u

                            Comment


                              #15
                              yeah thats what im trying to say lol he has coded the long way round and the short way to get more space now is to increase the location charcter settings to 255
                              otherwize he`s gonna have to go through all his scripts and change his addonline function back to how it was before lol

                              Comment

                              Working...
                              X