Number of User viewing?

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

    Number of User viewing?

    Could anyone please help me with this code to sho for eg.
    Code:
     General Forum (5 Viewing)
    I was trying to make it but got a bit confused

    WapCHAT Forum Currenltly changing over to xhtml

    My Dowloads Site

    #2
    4 lavalair?
    if like my post click:

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

    Comment


      #3
      yes for lavalair.

      WapCHAT Forum Currenltly changing over to xhtml

      My Dowloads Site

      Comment


        #4
        I think view similar code at hipertype site...
        if like my post click:

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

        Comment


          #5
          you meant hypetype? i dont see that option there

          WapCHAT Forum Currenltly changing over to xhtml

          My Dowloads Site

          Comment


            #6
            add like a section when a user enters into a forum fid add +1 to that forum count and when they goto another page take away the +1 kinda tricky but would work

            Comment


              #7
              bro could you give an example.

              WapCHAT Forum Currenltly changing over to xhtml

              My Dowloads Site

              Comment


                #8
                PHP Code:
                $x1=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum'"));
                $x2=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='......'"));
                $x3=
                $xn=
                $total $x1[0]=$x2[0]+$x3[0]+...+$xn[0]
                $visit "($total Viewing)";
                echo 
                "...";
                //make n $x.. for as many actions exists in forum 
                <?php unlink('World/Europe/Romania.country'); ?>

                Comment


                  #9
                  PHP Code:
                  $vfc=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Category'"));
                  $vft=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Topic'"));
                  $vfo=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum'"));
                  $cnt=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Creating new topic'"));
                  $pry=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Posting reply'"));
                  $fnx=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Forum Index'"));
                  $nif=$vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0] + $fnx[0];
                  echo 
                  "($nif) :Browsing Forums<br/>"
                  this might help not sure

                  Comment


                    #10
                    Originally posted by jsyguy23 View Post
                    PHP Code:
                    $vfc=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Category'"));
                    $vft=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum Topic'"));
                    $vfo=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Viewing Forum'"));
                    $cnt=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Creating new topic'"));
                    $pry=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Posting reply'"));
                    $fnx=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM online WHERE place='Forum Index'"));
                    $nif=$vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0] + $fnx[0];
                    echo 
                    "($nif) :Browsing Forums<br/>"
                    this might help not sure

                    hmm suppose the dude edit the places names?...........would been easier if he use the add to chat fuunctin..........just a few editing............

                    R.M.C
                    ----------
                    PHP Adovocate B)

                    Comment


                      #11
                      Originally posted by mcKeny View Post
                      hmm suppose the dude edit the places names?...........would been easier if he use the add to chat fuunctin..........just a few editing............
                      is better whit name bcoz the result is exact .. no member in forum if ther are not :P and this thing whit name is better and for chat.php and other
                      <?php unlink('World/Europe/Romania.country'); ?>

                      Comment


                        #12
                        i was working on something like this on my beta site before i got bored. basically i had numerical assignments for each page where

                        1=main
                        2=online users
                        3=forums
                        4=chat
                        e.c.t.

                        then in the users table i had an area field where i put in the number, then it was simply a case of doing

                        Code:
                        $ucnt_main = mysql_result(mysql_query("SELECT count(id) FROM users WHERE area=1"), 0);
                        it was actually more complex than that using constants and an array to do one query and populate all the counts quickly.

                        Just an idea. some people like the text based one, but since im a optimisation freak, ints are always my first choice when i cant use bools

                        Comment

                        Working...
                        X