Lavalair Wapdesire

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

    Lavalair Wapdesire

    By default only the owner of a profile can see a link to his own friends:

    This is the code for this function:
    Code:
    $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
    echo "[b]Buddies:[/b] $nob[0]
    ";
    example: My Buddies: 10



    Now I want, that everybody can see, who is my friend. I want to use a link to my friends, which is shown to everybody in my profil, but it doesn't work
    Code:
    //////////////////////////////friends edit///////////////////////////
      
    $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
    echo "[b]1 [/b]buddies : <a accesskey=\"1\" href=\"lists.php?action=buds&amp;sid=$sid;uid=$nob[0]\">$nob[0]</a>
    ";
      
     //////////////////////////////////////////////////////////////////////////

    #2
    <div class='quotetop'>QUOTE (monk77 @ Nov 28 2008, 03:57 PM) <{POST_SNAPBACK}></div>
    By default only the owner of a profile can see a link to his own friends:

    This is the code for this function:
    Code:
    $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid=&#39;".$who."&#39; OR tid=&#39;".$who."&#39;) AND agreed=&#39;1&#39;"));
    echo "[b]Buddies:[/b] $nob[0]
    ";
    example: My Buddies: 10



    Now I want, that everybody can see, who is my friend. I want to use a link to my friends, which is shown to everybody in my profil, but it doesn&#39;t work
    Code:
    //////////////////////////////friends edit///////////////////////////
      
    $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid=&#39;".$who."&#39; OR tid=&#39;".$who."&#39;) AND agreed=&#39;1&#39;"));
    echo "[b]1 [/b]buddies : <a accesskey=\"1\" href=\"lists.php?action=buds&amp;sid=$sid;uid=$nob[0]\">$nob[0]</a>
    ";
      
     //////////////////////////////////////////////////////////////////////////
    [/b]
    good code..maybe the link to see buddies it don&#39;t works because there is somethin&#39;wrong in php variables
    i don&#39;t have idea..i got my trubles trying to put hour/date in chatrooms message..
    sometmes it&#39;s real hard making changes in others one script
    sigpicthe italian/international COMMUNITY of friendship
    http://people2000.netne.net
    WAP/WEB
    peoplemailbox@katamail.com

    Comment


      #3
      Nobody does have an idea?

      Comment


        #4
        i got it on mine but its only for admins :P

        Comment


          #5
          <div class='quotetop'>QUOTE (inca @ Nov 28 2008, 09:36 PM) <{POST_SNAPBACK}></div>
          i got it on mine but its only for admins :P[/b]
          well, the function could be edited. can you post your code?

          Comment


            #6
            there is a slight error in it that i couldnt be bothered to work out lol (shows users aswell)

            Code:
            //////////////////////////////////users Buddies
            
            else if($action=="ubuds")
            {
                addonline(getuid_sid($sid),"Main Page","");
                $uid = getuid_sid($sid);
            $who = $_GET["who"];
              $nick = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
              echo "<head>";
              echo "<title>$sitename</title>";
              echo "</head>";
              echo "<body>";  
              echo "<div>
            $nick[0]&#39;s Buddies
            </div>";
                echo "<p align=\"center\">";
                echo "$nick[0]`s Buddy Message
            ";
                echo parsemsg(getbudmsg($who));
                
                echo "</p>";
                //////ALL LISTS SCRIPT <<
            
                if($page=="" || $page<=0)$page=1;
                $num_items = getnbuds($who);
                $items_per_page= 5;
                $num_pages = ceil($num_items/$items_per_page);
                if(($page>$num_pages)&&$page!=1)$page= $num_pages;
                $limit_start = ($page-1)*$items_per_page;
                    $sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid=&#39;".$who."&#39; OR b.tid=&#39;".$who."&#39;) AND b.agreed=&#39;1&#39; GROUP BY 1,2  ORDER BY a.lastact DESC LIMIT $limit_start, $items_per_page";
                echo "
            
            ";
                $items = mysql_query($sql);
                echo mysql_error();
                if(mysql_num_rows($items)>0)
                {
                while ($item = mysql_fetch_array($items))
                {
                    if($uid!=$item[2])
                    {
                      if(isonline($item[2]))
              {
                $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
                $uact = "WHERE: ";
                $plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid=&#39;".$item[2]."&#39;"));
                $uact .= $plc[0];
              }else{
                $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
                $uact = "Last Active: ";
                $ladt = date("d m y-H:i:s", $item[0]);
                $uact .= $ladt;
              }
                  $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$iml$item[1]</a>";
                  echo "$lnk
            ";
            
                  $bs = date("d m y-H:i:s",$item[5]);
                  echo "Buddy since:$bs
            ";
                  echo "$uact
            ";
                  echo "Says: ";
                  $bmsg = parsemsg(getbudmsg($item[2]));
                  echo "$bmsg
            ";
            
                  }
                }
                }
                echo "</p>";
                echo "<p align=\"center\">";
                if($page>1)
                {
                  $ppage = $page-1;
                  echo "<a href=\"lists.php?action=ubuds&amp;page=$ppage&amp;sid=$sid&amp;view=$view&amp;who=$who\">«PREV</a> ";
                }
                if($page<$num_pages)
                {
                  $npage = $page+1;
                  echo "<a href=\"lists.php?action=ubuds&amp;page=$npage&amp;sid=$sid&amp;view=$view&amp;who=$who\">Next»</a>";
                }
                echo "
            $page/$num_pages
            ";
                if($num_pages>2)
                {
                  $rets = "<form action=\"lists.php\" method=\"get\">";
                  $rets .= "<input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"2\"/>";
                  $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\">";
                  $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">";
                  $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\">";
                  $rets .= "<input type=\"Submit\" name=\"Submit\" Value=\"Go To Page\"></form>";
                  echo $rets;
                }
                echo "</p>";
              ////// UNTILL HERE >>
                echo "<p align=\"center\">";
                //echo "<a href=\"index.php?action=chbmsg&amp;sid=$sid\">";
            //echo "Buddy Message</a>
            ";
                echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
              echo "</p>";
              echo "</body>";
              exit(); 
            }

            Comment


              #7
              Hi Inca,

              I want to test your script, but it&#39;s a little bit difficult. The first part of your script must be put in index.php and the second one in lists? What kind of error is that?

              Comment


                #8
                oh i forgot heres the link for profiles:
                Code:
                $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid=&#39;".$who."&#39; OR tid=&#39;".$who."&#39;) AND agreed=&#39;1&#39;"));
                echo "Buddies: <a href=\"lists.php?action=ubuds&amp;who=$who&amp;sid=$sid\">$nob[0]</a>
                ";
                the error is that it shows the user aswell as there buddies lol
                it doesnt really matter to me so i havent bothered to code it out lol

                Comment


                  #9
                  I think actually, there is no way to show users&#39; buddies.

                  @Inca

                  Can you tell me, where I must paste your code? First part of code in index.php und the secound one in lists.php?

                  Comment


                    #10
                    <div class='quotetop'>QUOTE (monk77 @ Nov 30 2008, 11:09 AM) <{POST_SNAPBACK}></div>
                    I think actually, there is no way to show users&#39; buddies.

                    @Inca

                    Can you tell me, where I must paste your code? First part of code in index.php und the secound one in lists.php?[/b]
                    I edited my lists.php, but the script don&#39;t work. It&#39;s such the same as my simple link does. If I klick to a user, nothing else as users name is show in his buddy-list. Why do you have a second lists-file? A few links go to lists2.php

                    edit: script works now, but why the second lists.php? Is this a must have oder can I edit the code from lists2.php in list.php in the links?

                    Comment


                      #11
                      Code:
                      $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mw_buddies WHERE (uid=&#39;".$who."&#39; OR tid=&#39;".$who."&#39;) AND agreed=&#39;1&#39;"));
                      echo "Buddies: <a href=\"../friends/".$swsid."action=member&amp;who=$who\">$nob[0]</a>
                      
                      ";
                      this is my code :P
                      if like my post click:

                      http://coding-talk.com/images/totall...ost_thanks.gif

                      Comment


                        #12
                        <div class='quotetop'>QUOTE (sweetangel @ Nov 30 2008, 04:52 PM) <{POST_SNAPBACK}></div>
                        Code:
                        $nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mw_buddies WHERE (uid=&#39;".$who."&#39; OR tid=&#39;".$who."&#39;) AND agreed=&#39;1&#39;"));
                        echo "Buddies: <a href=\"../friends/".$swsid."action=member&amp;who=$who\">$nob[0]</a>
                        
                        ";
                        this is my code :P[/b]
                        but you need having a folder called "friends" to use it..
                        sigpicthe italian/international COMMUNITY of friendship
                        http://people2000.netne.net
                        WAP/WEB
                        peoplemailbox@katamail.com

                        Comment


                          #13
                          so u want every1 2 see ur buddy list lol thats kinda weird but not that hard buddylist runs off ur own uid jus make another n run it off the users uid easy lol

                          Comment


                            #14
                            <div class='quotetop'>QUOTE (honkytonkman @ Nov 30 2008, 05:17 PM) <{POST_SNAPBACK}></div>
                            but you need having a folder called "friends" to use it..[/b]
                            is this a joke or what does the folder friends contain?????????

                            Comment


                              #15
                              u dnt use a folder wtf lol

                              Comment

                              Working...
                              X