wiev topic link

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

    wiev topic link

    how to function in addonline instead be a link topics that user sees?
    Code:
    $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
        $tnm = htmlspecialchars($tinfo[0]);
      addonline(getuid_sid($sid),"<b>Watch Topic($tnm)</b>","");
    I tried to do this
    Code:
    $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
        $tnm = htmlspecialchars($tinfo[0]);
      addonline(getuid_sid($sid),"<b>Watch Topic"<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid\">$tinfo[0]</a></b>","");
    but it is not good ... show link topics, but join the SID of users who viewed the subject, not in my sid...Does anyone have an idea how to insert a link topics?? ..
    I tried with the help of BB code
    Code:
    $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
         $tnm = htmlspecialchars($tinfo[0]);
      addonline(getuid_sid($sid),"<b>Watch Topic [topic=$tid]$tinfo[0][/topic]</b>","");
    but not for BB code in function addonline...
    sigpichttp://happy.srecnica.com/web

    #2
    PHP Code:
    addonline(getuid_sid($sid),"<b>Watch Topic($tnm)</b>","index.php?action=viewtpc&amp;tid=$tid&amp;sid=$sid"); 
    Last edited by something else; 11.09.09, 18:52.

    Comment


      #3
      test - Watch Topic(Pewajmo!) ///// no link!!!!! Topic (Pevajmo) should be a link .. I click on the link and go to the theme that the user sees the test
      sigpichttp://happy.srecnica.com/web

      Comment


        #4
        thats cos u need to alter your online list aswell :P (its already half set up)

        Comment


          #5
          Originally posted by something else View Post
          thats cos u need to alter your online list aswell :P (its already half set up)
          xexe Do not be joking, but help :p
          sigpichttp://happy.srecnica.com/web

          Comment


            #6
            im not joking its already half set up... i havent got a copy of original online list so i cant show u :P

            Comment


              #7
              Originally posted by something else View Post
              im not joking its already half set up... i havent got a copy of original online list so i cant show u :P
              I do not understand you .. Tell me another way please
              sigpichttp://happy.srecnica.com/web

              Comment


                #8
                show me your online list script and i can add it for you

                Comment


                  #9
                  Code:
                  else if($action=="online"){
                  addonline(getuid_sid($sid),"<b>Online List</b>","");
                  echo "<card id=\"main\" title=\"[".getnumonline()."] Online\">";
                  echo "<p align=\"center\">";
                  
                  $nouo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE hidden = 1"));
                  $num_items = getnumonline(); //changable
                  if (ismod($uid)){
                      $clkd = "<a href=\"modcp.php?action=hidden&amp;sid=$sid\">Nevidljivi</a>.";
                  echo " ".$nouo[0]."  $clkd.<br/>";
                  
                  }
                  else{
                      $clkd = "Nevidljiv";
                  }
                  
                  echo "</p>";
                  $placedet= getip;
                  if($page=="" || $page<=0)$page=1;
                  $items_per_page= 20;
                  $num_pages = ceil($num_items/$items_per_page);
                  if($page>$num_pages)$page= $num_pages;
                  $limit_start = ($page-1)*$items_per_page;
                   $sql = "SELECT
                              a.name, b.place, b.userid, sex FROM ibwf_users a
                              INNER JOIN ibwf_online b ON a.id = b.userid WHERE b.hidden = 0
                  
                              GROUP BY 1,2
                              LIMIT $limit_start, $items_per_page";
                  
                  
                  
                     
                  
                  
                  "<img src=\"images/online.gif\" alt=\"*\"/><br/>";
                  echo "<p align=\"center\">";
                  $lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY lastpost DESC LIMIT 0,1"));
                        $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts"));
                        if($nops[0]==0)
                        {
                          $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics"));
                          $tluid = $pinfo[0];
                          
                        }else{
                          $pinfo = mysql_fetch_array(mysql_query("SELECT  uid  FROM ibwf_posts ORDER BY dtpost DESC LIMIT 0, 1"));
                          
                          $tluid = $pinfo[0];
                        }
                        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
                        $tlnm = htmlspecialchars($lpt[1]);
                        $tlnick = getnick_uid($tluid);
                        $tpclnk = "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$lpt[0]&amp;go=last\">$tlnm</a>";
                        $vulnk = "<br/><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$tluid\">$tlnick</a><br/>";
                  if(!isforumblocked($uid)){
                  
                        echo "<small><b>Poslednja poruka je napisana u temi</b><br/>$tpclnk<br/><b>Od:</b> $vulnk</small><br/>";
                  
                  
                  $timeout = 180;
                  $timeon = time()-$timeout;
                  $chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
                  echo " <a href=\"chat.php?rid=100&amp;sid=$sid\">HAPPY KVIZ</a>($chs[0])<br/><br/>";
                  }
                  
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
                  echo "<a href=\"index.php?action=stfol&amp;sid=$sid\">Tim Online: ".$noi[0]."</a><br/>";
                  $timeout = 180;
                  $timeon = time()-$timeout;
                  
                  $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE vip>'0' AND lastact>'".$timeon."'"));
                  echo "<a href=\"index.php?action=vipon&amp;sid=$sid\">Vip Chlanovi Online: ".$noi[0]."</a><br/>";
                  echo "<a href=\"index.php?action=online&amp;sid=$sid\">Osvezi</a><br/>";
                  
                  $tmsg = getpmcount(getuid_sid($sid));
                  $umsg = getunreadpm(getuid_sid($sid));
                  
                  echo "</p>";
                  echo "<p align=\"center\">";
                  echo "<small>";
                  
                      $items = mysql_query($sql);
                      echo mysql_error();
                      while ($item = mysql_fetch_array($items))
                      {
                  
                  
                  $gender = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$item[2]."'"));
                  if($gender[0]=="M") {
                  $seximg = "<img src=\"smilies/kid.gif\" alt=\"M\"/>";
                  }else if($gender[0]=="F") {
                  $seximg = "<img src=\"smilies/gr1.gif\" alt=\"F\"/>";
                  }else{
                  $seximg = "<img src=\"images/alien.gif\" alt=\"A\"/>";
                  }
                  $pr = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$item[2]."'"));
                  if($pr[0]=="1") {
                  $prm = "<br/><img src=\"http://fotke.srecnica.com/mod.GIF\" alt=\"Moder\"/>";
                  
                  }else if($pr[0]=="2") {
                  $prm = "<br/><img src=\"http://fotke.srecnica.com/adm.GIF\" alt=\"Admin\"/>";
                  
                  }
                  else if($pr[0]=="4") {
                  $prm = "<br/><img src=\"images/vl.GIF\" alt=\"Vlasnik\"/>";
                  }else if($pr[0]=="5") {
                  $prm = "<br/><img src=\"http://fotke.srecnica.com/penzioner.GIF\" alt=\"Penzioner\"/>";
                  }
                  else if($pr[0]=="6") {
                  $prm = "<br/><img src=\"http://fotke.srecnica.com/svaler.gif\" alt=\"Svaler\"/>";
                  }
                  else{
                  $prm ="";
                  }
                  
                  $status = getstatus($item[2]);
                  $nopl = mysql_fetch_array(mysql_query("SELECT onlpotpis FROM ibwf_users WHERE id='".$item[2]."'"));
                  $onlpotpis = parsepm($nopl[0], $sid);
                  $lnk = "$seximg <a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">".getnick_uid($item[2])."</a> <br/><b>Status: $status <br/>Trenutno $item[1]</b>";
                              if($item[2]==0) {
                              
                  echo "<b>- GOST na online -IP $item[3]-- Browser $item[4]<br/>Trenutno: $item[1] </b><br/>-----<br/>";
                  }
                  
                  else 
                  {
                  
                  echo "$lnk<br/>$onlpotpis<br/><br/>-----<br/>";
                  
                  
                  }
                  }
                  
                  echo "</small></p>";
                  echo "<p align=\"center\">";
                  if($page>1)
                  {
                  $ppage = $page-1;
                  echo "<a href=\"index.php?action=online&amp;page=$ppage&amp;sid=$sid\">Nazad</a> ";
                  }
                  if($page<$num_pages)
                  {
                  $npage = $page+1;
                  echo "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">Napred</a>";
                  }
                  echo "<br/>$page/$num_pages<br/>";
                  if($num_pages>2)
                  {
                  echo getjumper($action, $sid,"index");
                  }
                  echo "</p>";
                  ////// UNTILL HERE >>
                  
                  echo "<p align=\"center\">";
                  $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id='2'"));
                  echo "<small>Najvise Online: $mols[1]</small><br/>";
                  
                  $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
                  echo "<small>Najvise Online Danas: $mols[0]</small><br/>";
                   $tm24 = time() - (24*60*60);
                  $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$tm24."'"));
                  echo mysql_error();
                  echo "<small>Online za 24h: <a href=\"index.php?action=actmem&amp;sid=$sid\">$aut[0]</a></small><br/>";
                  if(!isforumblocked($uid)){
                  
                    echo "<a href=\"index.php?action=onlpotpis&amp;sid=$sid\">[Online Potpis]</a><br/>";
                  }
                  echo "<img src=\"images/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
                  echo "HAPPY</a>";
                  echo "</p>";
                  echo "</card>";
                  }
                  sigpichttp://happy.srecnica.com/web

                  Comment


                    #10
                    that online list you posted above has fatal errors in it so its not worth me adding it to :P

                    Comment


                      #11
                      Originally posted by something else View Post
                      that online list you posted above has fatal errors in it so its not worth me adding it to :P
                      any fatal errors ????? about which you speak?...
                      sigpichttp://happy.srecnica.com/web

                      Comment


                        #12
                        Code:
                        "<img src=\"images/online.gif\" alt=\"*\"/><br/>";
                        no echo

                        Comment


                          #13
                          Originally posted by something else View Post
                          Code:
                          "<img src=\"http://coding-talk.com/images/online.gif\" alt=\"*\"/><br/>";
                          no echo
                          xexe and does not need echo .. I no like see the pictures but ok .. remove that code is the script .. Come now, tell me how my topic shows as Link
                          Last edited by srecnica; 11.09.09, 22:22.
                          sigpichttp://happy.srecnica.com/web

                          Comment


                            #14
                            the online code you have placed is really messy

                            basically u need to change to this:

                            $sql = "SELECT
                            a.name, b.place, b.userid, a.sex, b.placedet FROM ibwf_users a
                            INNER JOIN ibwf_online b ON a.id = b.userid WHERE b.hidden = 0

                            GROUP BY 1,2
                            LIMIT $limit_start, $items_per_page";

                            then have:
                            if($item[4]!=""){
                            $where = "<a href=\"$item[4]&amp;sid=$sid\">Goto </a>";
                            }

                            then put $where in after your place name

                            Comment


                              #15
                              Originally posted by something else View Post
                              the online code you have placed is really messy

                              basically u need to change to this:

                              $sql = "SELECT
                              a.name, b.place, b.userid, a.sex, b.placedet FROM ibwf_users a
                              INNER JOIN ibwf_online b ON a.id = b.userid WHERE b.hidden = 0

                              GROUP BY 1,2
                              LIMIT $limit_start, $items_per_page";

                              then have:
                              if($item[4]!=""){
                              $where = "<a href=\"$item[4]&amp;sid=$sid\">Goto </a>";
                              }

                              then put $where in after your place name
                              why $item[4]??? Is not the location $item[1]?? place?

                              post your online list here please.... I see the difference between your and my code
                              Last edited by srecnica; 11.09.09, 22:58.
                              sigpichttp://happy.srecnica.com/web

                              Comment

                              Working...
                              X