wat function or declaration.

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

    wat function or declaration.

    wat function or declaration sud i add in this to also show topic poster name with the topic. // it is the code.

    PHP Code:
    ///////////pinned topics
          
    $topics mysql_query("SELECT id, name, closed, views, pollid FROM ibwf_topics WHERE fid='".$fid."' AND pinned='1' ORDER BY lastpost DESC, name, id LIMIT 0,5");
          while(
    $topic mysql_fetch_array($topics))
        {
          
    //$iml = "<img src=\"http://coding-talk.com/images/normal.gif\" alt=\"*\"/>";
          
    $iml "*";
          
    $atxt ="";
          if(
    $topic[2]=='1')
          {
            
    //closed
            
    $atxt "(X)";
          }
          if(
    $topic[4]>0)
          {
            
    $pltx "(P)";
          }else{
            
    $pltx "";
          }
          
    $tnm htmlspecialchars($topic[1]);
          
    $nop mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$topic[0]."'"));
          echo 
    "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$topic[0]\">[COLOR="Red"](i need to add it here)[/COLOR]$pltx$tnm($nop[0])$atxt</a><br/>";

        }
        echo 
    "<br/>";
        echo 
    "<br/>";
      } 
    but nt getting the function to declair it.
    Last edited by Anshul; 09.11.09, 22:17. Reason: use tags

    #2
    Add authorid in the array..
    PHP Code:
    $topics mysql_query("SELECT id, name, closed, views, pollid, authorid FROM ibwf_topics WHERE fid='".$fid."' AND pinned='1' ORDER BY lastpost DESC, name, id LIMIT 0,5"); 
    and this is what you want:
    PHP Code:
    echo "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$topic[0]\">".getnick_uid($topic[5]).": $pltx$tnm($nop[0])$atxt</a><br/>"
    My Blog: http://jhommark.blogspot.com
    My Facebook: http://www.facebook.com/jhommark
    My Official Site: http://www.undergroundweb.tk
    My Community Site: http://undergroundwap.xtreemhost.com

    Comment


      #3
      I was happy i had an answer, but killer_eyed-14 answered before me! No luck!
      mysterio.al - programming is a functional art

      Comment


        #4
        ok thnx mate. m trying it.

        Comment


          #5
          Hehe.,it's ok mate..Author already know you have the answer, too..I'll give you his half thanks..
          My Blog: http://jhommark.blogspot.com
          My Facebook: http://www.facebook.com/jhommark
          My Official Site: http://www.undergroundweb.tk
          My Community Site: http://undergroundwap.xtreemhost.com

          Comment


            #6
            something wron in it. it is done wat i said. but the hell, it is showing unlimited same topics which page didnt got fully load even on broadband. // showing 1 topic many many many times. when i did this.

            Comment


              #7
              it worked sucessfully for pinned topics. but nt working in normals.

              Comment


                #8
                it worked. thnx allot. topic closed.

                Comment


                  #9
                  Originally posted by kiLLeR-eyEd_14 View Post
                  Hehe.,it's ok mate..Author already know you have the answer, too..I'll give you his half thanks..
                  and the other half?
                  mysterio.al - programming is a functional art

                  Comment


                    #10
                    its nt done.. name not coming with normal topics. obly done for pinned.

                    Comment

                    Working...
                    X