Feedback & Support All things related to PokéCommunity, from feedback and ideas to support and questions.

Closed Thread
 
Thread Tools
  #1    
Old October 6th, 2011 (9:29 AM).
Truality Truality is offline
Left for good
     
    Join Date: Aug 2011
    Gender: Male
    Posts: 1,007
    Hello everyone, I've thought several times about posting this but I was quite hesitant, and I finally got enough info on it today.

    So this suggestion is about adding something to each member's profile 'statistics' page, which shows a percentage of their posts and in which section they make it. I've seen it in a forum I frequent and it's really cool, the best plus of it is-of course-that it lets you know which sections you or anybody else frequents the most and the least.


    For example:


    Code:
    Truality's Active Area
    
    Community Questions and feedback: 22% 
    Emulation: 18%
    Art Gallery: 26%
    Other Voting Polls: 20%
    Other Chat: 14%
    That's just a mere example with names and numbers, supposedly more forums could be added to show a 0%, meaning the member has no posts in that area.

    The thing I was searching for all this time, though, was a code, and I finally found it somewhere in that forum. Here's the code and credits for it go to the member's name mentioned:

    Spoiler:
    [link]
    Quote:
    Originally Posted by KeepWalking
    Hi.
    I've created a cron job with this code:
    Code:
    $_ACTIVEFORUMS = array(
            28 => "Forum name1",
            30 => "Forum name2",
            109 => "Forum name3",
            108 => "Forum name4",
            107 => "Forum name5",
            110 => "Forum name6",
            87 => "Forum name7",
            115 => "Forum name8",
            114 => "Forum name9",
            52 => "Forum name10",
            112 => "Forum name11",
            27 => "Forum name12",
            123 => "Forum name13"
            // ETC ETC ETC // 
    );
    
    // WE PUT THE FORUM ID AND THE ACTIVE AREA NAME
    
    $Q = $db->sql_query("
    select post.threadid, thread.forumid as forumid, userid, postid FROM post LEFT JOIN thread ON thread.threadid = post.threadid
    WHERE post.visible = 1 AND post.infraction = 0
    ");
    $TOTAL = array();
    while ($row = $db->sql_fetchrow($Q))
    {
            $TOTAL[$row['userid']]++;
            if ($_ACTIVEFORUMS[$row['forumid']]) $ACTIVE[$row['userid']][$_ACTIVEFORUMS[$row['forumid']]]++;
    }
    
    $RESULT = array();
    foreach ($ACTIVE as $i => $v)
    {
            if (!empty($v))
                    foreach ($v as $j => $k)
                            $RESULT[$i][$j] = round(100*$k/$TOTAL[$i]);
    }
    
    
    foreach ($RESULT as $i => $v) $db->sql_query("REPLACE INTO `activearea` VALUES ($i, '".serialize($v)."')");
    
    /*
    THE ACTIVE AREA TABLE
    CREATE TABLE `activearea` (
      `userid` int(11) NOT NULL auto_increment,
      `stats` text,
      PRIMARY KEY  (`userid`)
    ) ENGINE=MyISAM AUTO_INCREMENT=816210 DEFAULT CHARSET=latin1
    */
    After that i created a new class in includes/class_profileblock.php
    Code:
    /**
    * Profile Block for Mini Statistics
    *
    * @package vBulletin
    */
    class vB_ProfileBlock_MiniStats extends vB_ProfileBlock
    {
        /**
        * The name of the template to be used for the block
        *
        * @var string
        */
        var $template_name = 'memberinfo_block_ministats';
    
        /**
        * Variables to automatically prepare
        *
        * @var array
        */
        var $auto_prepare = array();
        function prepare_output($id = '', $options = array())
        {
            $USERID = $this->profile->userinfo['userid'];
            $RESULT = $this->registry->db->query_read_slave("SELECT * FROM activearea WHERE userid = $USERID");
            $DATA = $this->registry->db->fetch_array($RESULT);
            $DATA = unserialize(trim($DATA['stats']));
    
            $this->block_data['activearea'] = '';
            $total = 0;
    
            $ACTIVEAREAS = array(
                "DotA Chat","Game Strategy","Advanced Mechanics","DotA Replays","Suggestions","DotA Media","DotA Tools & AI","DotA Chinese",
                "Competitive Scene","Member Service","Random Chat"
            );
    
            foreach ($ACTIVEAREAS as $v)
            {
                if (!$DATA[$v]) $this->block_data['activearea'] .= $v.': 0%<br />';
                else
                {
                    $this->block_data['activearea'] .= $v.": {$DATA[$v]}%<br />";
                    $total += $DATA[$v];
                }
            }
            $this->block_data['activearea'] .= "Others: ".(100-$total)."%";
    
        }
    }
    After that in member.php you must add the new class in array
    Code:
    $globaltemplates = array(.....
        'memberinfo_block_infractions',
        'memberinfo_block_ministats',
        'memberinfo_block_profilefield',
        'memberinfo_block_visitormessaging'
    ....);
    And in array $blocklist where you store the order of the blocks

    Code:
    $blocklist = array(
        'stats_mini' => array(
            'class' => 'MiniStats',
            'title' => $vbphrase['mini_statistics'],
        ),
        'friends_mini' => array(
            'class' => 'Friends',
            'title' => $vbphrase['friends'],
        ),
    ........);
    And to show it you find template memberinfo_block_ministats and add:

    Code:
    <dt class="shade">Members Active area<dt>
    <dd>$block_data[activearea]</dd>
    Anyway, i dont know if this helps to much, this of course can be achieved using hooks and plugins
    I don't know if it can't be implemented here but that's all I got.


    So that's about it. I really want to know what you think about it. Let's see how this goes, shall we?
    __________________
    This is my December . . .

    Relevant Advertising!

      #2    
    Old October 6th, 2011 (9:42 AM).
    Oryx's Avatar
    Oryx Oryx is offline
    CoquettishCat
    • Crystal Tier
     
    Join Date: Mar 2011
    Age: 24
    Gender: Female
    Nature: Relaxed
    Posts: 13,204
    Wow, you definitely put a lot of research into this. The only argument I can see against this (outside of the usual "we don't need anything let's not change a thing" people) is if it can't be implemented here. I'd really like to hear from the people that would implement it to see if it's possible, but I think it's a pretty awesome idea and I would use this really often.
    __________________


    Theme * Pair * VM * PM

    Not all men...

    Are all men stupid?

    That's right.

      #3    
    Old October 6th, 2011 (9:51 AM).
    Sydian's Avatar
    Sydian Sydian is offline
    case CLOSED.
    • Crystal Tier
     
    Join Date: Feb 2008
    Location: Alabama
    Age: 24
    Nature: Timid
    Posts: 32,104
    That's pretty nifty, actually. But you'd all be mad that 90% of my posts are invisible to y'all. :'( jk But I think this is a cool feature. I'd like to see it implemented if it's possible!
    __________________
    ≫ they took a little look at my heart
    they found a prince living behind bars ≪

    challenges | klippy
      #4    
    Old October 6th, 2011 (9:54 AM).
    Patchisou Yutohru's Avatar
    Patchisou Yutohru Patchisou Yutohru is offline
    • Developer
    • Platinum Tier
     
    Join Date: Oct 2004
    Location: New Jersey
    Gender: Male
    Nature: Quirky
    Posts: 17,264
    Oh I love this idea, and you put so much thought into for me to really even contemplate saying no.

    I'd be really interested to know where most of my activity (in numbers) goes to. What about forums that aren't accessible to everyone, though?
      #5    
    Old October 6th, 2011 (9:57 AM).
    Truality Truality is offline
    Left for good
       
      Join Date: Aug 2011
      Gender: Male
      Posts: 1,007
      Quote:
      Originally Posted by Patchisou Yutohru View Post
      What about forums that aren't accessible to everyone, though?
      I think you can manipulate the forums included with the variables, and just add an 'Other' for those not supposed to be viewed. Or not include them at all and let 'em guess where the rest of the posts go to. xD
      __________________
      This is my December . . .
        #6    
      Old October 6th, 2011 (10:08 AM).
      Vrai's Avatar
      Vrai Vrai is offline
      can you feel my heart?
      • Crystal Tier
       
      Join Date: Jun 2008
      Age: 23
      Gender: Male
      Nature: Adamant
      Posts: 2,893
      I think this is pretty neat. Not necessary, but definitely neat. Can we do it? 8)
      __________________
        #7    
      Old October 6th, 2011 (10:09 AM).
      Bebop's Avatar
      Bebop Bebop is offline
      you're a nut you're crazy in the coconut
      • Administrator
      • Crystal Tier
      • Discord Moderoid
      • Developer
       
      Join Date: May 2005
      Age: 26
      Nature: Gentle
      Posts: 11,146
      Let me make sure it's okay with HQ before I add it, but thanks for providing the code. C: I like it.
      __________________
      cosmos without hatred, diamond stars of cosmic light, quasars shine through endless nights
        #8    
      Old October 6th, 2011 (10:27 AM).
      Seto's Avatar
      Seto Seto is offline
      if i keep my eyes closed
      • Crystal Tier
       
      Join Date: Jul 2005
      Location: United States
      Nature: Brave
      Posts: 10,321
      Well for those of us who post in hidden areas the most, the names for them could still be shown. Names are no huge deal, and its not like people would be able to click and visit them. XD;

      Love this idea though, I've always wanted PC to have something of the sort. 8D
      __________________

      theme
      previously known as Drew
      paired to Mezzo
        #9    
      Old October 6th, 2011 (10:47 AM).
      Alley Cat's Avatar
      Alley Cat Alley Cat is offline
         
        Join Date: Jun 2011
        Posts: 788
        I like this idea a lot, and the work is already done, it just omes down to it geting approved and put in pace. I don't see a way for this information to be super practical, but I don't really care, it's just for fun.
          #10    
        Old October 6th, 2011 (11:33 AM).
        Zelda's Avatar
        Zelda Zelda is offline
        ⍃⍍⍄ ⍃⍍⍄
        • Crystal Tier
         
        Join Date: Oct 2008
        Location: +
        Age: 3
        Gender: Female
        Nature: Adamant
        Posts: 4,876
        Wow, I'm surprised something like this hasn't been thought of before. o_o It's a really good idea though, wish I had even thought of it myself.

        Hopefully the H-Staff decide to approve of this!
        __________________

        wisdom cries. paired to Cay & Exile & Sombra
          #11    
        Old October 6th, 2011 (11:42 AM).
        Xyrin's Avatar
        Xyrin Xyrin is offline
        Furret
        • Gold Tier
         
        Join Date: May 2008
        Location: Northern Indiana, USA
        Age: 18
        Gender: Male
        Nature: Jolly
        Posts: 1,065
        Yes I LOVE this idea, it would be pretty awesome to see where all my posts are. Hopefully this will be implemented quickly.
        __________________

        Furret


        The Creeper Hub ~ x - Icons by Anastasia - My Twitter ~ x
          #12    
        Old October 6th, 2011 (11:46 AM).
        Chikara's Avatar
        Chikara Chikara is offline
        ʕ´•ᴥ•`ʔ
        • Crystal Tier
         
        Join Date: Oct 2004
        Location: Missouri, why? ◉◡◉
        Age: 25
        Gender: Female
        Nature: Sassy
        Posts: 8,280
        Aaaaaha, I like this a lot :D

        Honestly, I don't think I'll be using it much, but it'll be interesting to check out. Now, will this count all posts we've ever made, or will it just be what posts we do after the thing gets added, if it gets added? Hopefully the first one ):
        __________________
        [taking a break, life is killing me]

        paired with SYNDROME
          #13    
        Old October 6th, 2011 (11:50 AM).
        Crimson5M's Avatar
        Crimson5M Crimson5M is offline
        what
        • Crystal Tier
         
        Join Date: Feb 2011
        Location: Scotland
        Age: 21
        Gender: Male
        Nature: Quiet
        Posts: 1,101
        So everybody likes this idea?
        Well...I DON'T OMG IT SUX IT SUX SOOOOOOO BAD!!!!!
        Jk, it seems pretty neat actually :)
        __________________
        Youtube
          #14    
        Old October 7th, 2011 (4:15 AM).
        Cassino's Avatar
        Cassino Cassino is offline
           
          Join Date: Oct 2006
          Nature: Serious
          Posts: 7,755
          Provided I can opt-out/hide it, I'm fine with this.
            #15    
          Old October 7th, 2011 (4:25 AM).
          vaporeon7's Avatar
          vaporeon7 vaporeon7 is offline
          My life would suck without you
          • Crystal Tier
           
          Join Date: Aug 2010
          Location: Preparing for trouble and making it double.
          Gender: Male
          Nature: Adamant
          Posts: 5,154
          I think this is a great idea. I think it would be really interesting to see what I post in the most, as well as a few others ;) I can't see a reason why not, unless it isn't possible.
          __________________
            #16    
          Old October 7th, 2011 (5:43 AM).
          countryemo's Avatar
          countryemo countryemo is offline
          Kicking against the earth!
          • Silver Tier
           
          Join Date: Dec 2009
          Location: Littleroot Town
          Age: 23
          Gender: Male
          Nature: Quiet
          Posts: 2,322
          Quote:
          Originally Posted by Ausaudriel View Post
          Let me make sure it's okay with HQ before I add it, but thanks for providing the code. C: I like it.
          I say we can take this as a yes. No?

          This is really neat idea, surprised it hasn't been done, haha. And we got the code already so even better! Cant wait, more to stalk! erm..
          __________________
            #17    
          Old October 7th, 2011 (6:03 AM).
          Patchisou Yutohru's Avatar
          Patchisou Yutohru Patchisou Yutohru is offline
          • Developer
          • Platinum Tier
           
          Join Date: Oct 2004
          Location: New Jersey
          Gender: Male
          Nature: Quirky
          Posts: 17,264
          This is going to be added. It got majority.
            #18    
          Old October 7th, 2011 (6:44 AM). Edited October 7th, 2011 by Zet.
          Zet's Avatar
          Zet Zet is offline
          • Platinum Tier
           
          Join Date: Sep 2007
          Location: Brisbane, Australia
          Age: 27
          Gender: Male
          Nature: Jolly
          Posts: 7,754
          I know this is probably late but.... correct me if I'm wrong but wouldn't this feature search for all your posts just to get the results? So wouldn't that strain the server a bit?
            #19    
          Old October 7th, 2011 (6:56 AM).
          Squirrel's Avatar
          Squirrel Squirrel is offline
          D-I-N-O-S-A
          • Crystal Tier
           
          Join Date: Sep 2011
          Location: England
          Age: 23
          Gender: Male
          Nature: Quirky
          Posts: 9,512
          Hmm, pretty cool idea... But wouldn't it take up a lot of space? :s
          __________________
            #20    
          Old October 7th, 2011 (7:20 AM).
          Eliminator Jr.'s Avatar
          Eliminator Jr. Eliminator Jr. is offline
             
            Join Date: Apr 2009
            Location: Melbourne, Australia
            Age: 24
            Gender: Male
            Nature: Calm
            Posts: 1,031
            Quote:
            Originally Posted by Zet View Post
            I know this is probably late but.... correct me if I'm wrong but wouldn't this feature search for all your posts just to get the results? So wouldn't that strain the server a bit?
            I'm not an expert on computers by any means, but perhaps this won't place much stress on the server because unlike name-changing, all this code does is gather information and statistics from posts, not implement changes to all those posts.
              #21    
            Old October 7th, 2011 (7:47 AM).
            Incineroar's Avatar
            Incineroar Incineroar is offline
            the spirit of the fighter
            • Moderator
            • Platinum Tier
            • Developer
             
            Join Date: May 2009
            Location: Iki Town
            Age: 22
            Gender: Male
            Nature: Brave
            Posts: 13,480
            It looks like you went through a lot of work to get the details on this feature. It looks quite useful so we can see where we frequent. I like the idea myself.
            Quote:
            Originally Posted by Patchisou Yutohru View Post
            This is going to be added. It got majority.
            Seeing this makes me happy. :D
            __________________
              #22    
            Old October 8th, 2011 (5:46 PM).
            Melody's Avatar
            Melody Melody is offline
            ♥ Hugging You, that's what friends do!~ ♥
            • Crystal Tier
             
            Join Date: Oct 2004
            Location: Cuddling those close to me
            Gender: Female
            Nature: Naughty
            Posts: 6,278
            My only beef with this idea would be if we were unable to hide this from our profile or make it private. Please make sure that we have some level of control over it's view ability. I don't like being tracked for public spectacle.
            __________________
            PAIRS
            Astral and Soipe
            Member Of Discord HypeSquad

              #23    
            Old October 8th, 2011 (5:53 PM).
            Zet's Avatar
            Zet Zet is offline
            • Platinum Tier
             
            Join Date: Sep 2007
            Location: Brisbane, Australia
            Age: 27
            Gender: Male
            Nature: Jolly
            Posts: 7,754
            Quote:
            Originally Posted by Pachy View Post
            My only beef with this idea would be if we were unable to hide this from our profile or make it private. Please make sure that we have some level of control over it's view ability. I don't like being tracked for public spectacle.
            why have the option to hide it when anyone can easily view posts you have made, to get a general idea in which forum you post a lot in.
              #24    
            Old October 8th, 2011 (5:58 PM).
            Oryx's Avatar
            Oryx Oryx is offline
            CoquettishCat
            • Crystal Tier
             
            Join Date: Mar 2011
            Age: 24
            Gender: Female
            Nature: Relaxed
            Posts: 13,204
            Yeah, this isn't showing anything new, and nothing in statistics is able to be hidden afaik, so no reason to assume this will be.
            __________________


            Theme * Pair * VM * PM

            Not all men...

            Are all men stupid?

            That's right.

              #25    
            Old October 8th, 2011 (6:07 PM).
            McCree's Avatar
            McCree McCree is offline
            yes they change
            • Discord Moderoid
            • Platinum Tier
            • EOEvent Organizer
             
            Join Date: Dec 2006
            Location: canadiadanada
            Gender: Male
            Nature: Calm
            Posts: 5,589
            Quote:
            Originally Posted by Zet View Post

            why have the option to hide it when anyone can easily view posts you have made, to get a general idea in which forum you post a lot in.
            Why not have the option to hide it to ensure satisfaction by all members, rather than only a certain portion?
            __________________
            Closed Thread
            Quick Reply

            Sponsored Links
            Thread Tools

            Posting Rules
            You may not post new threads
            You may not post replies
            You may not post attachments
            You may not edit your posts

            BB code is On
            Smilies are On
            [IMG] code is On
            HTML code is Off

            Forum Jump


            All times are GMT -8. The time now is 10:29 AM.