Skip to:
Content
Pages
Categories
Search
Top
Bottom

[New feature] View/Hit Counts


  • DevynCJohnson
    Participant

    @devyncjohnson

    I love the bbpress-simple-view-counts plugin (https://wordpress.org/plugins/bbpress-simple-view-counts/). However, it has not been maintained in months. Could the bbPress developers consider integrating this plugin into bbPress and include a dashboard widget (or admin page) showing a list of topic-pages and their view counts? If such a feature is added to bbPress, can it be made to migrate the bbpress-simple-view-counts plugin’s data?

Viewing 11 replies - 1 through 11 (of 11 total)

  • Robkk
    Moderator

    @robkk

    you can use this as an alternative if you want.

    https://wordpress.org/plugins/wp-postviews/

    you would have to put this code somewhere in your loop-single-topic.php file in your child theme.

    <?php if(function_exists('the_views')) { the_views(); } ?>

    Maybe replace voice count?? or create a new column?? or just like simple view counts has like this.

    function rk_bbp_postviews() {
      if (function_exists('the_views')) { 
    	
    	echo the_views(); 
      
      }
      
    }  
    
    add_action( 'bbp_theme_after_topic_started_by', 'rk_bbp_postviews' );

    heck you can even use jetpack for post views.


    DevynCJohnson
    Participant

    @devyncjohnson

    @robkk , thanks. Actually, I had written some code like that for my website late last night. The result can be seen in action at http://dcjtech.info/forum/articles/operating-systems/linux/ . I even figured out how to migrate the bbpress-simple-view-counts data to my implementation. The migration was easy (a few SQL queries via phpMyAdmin) and not at all complex as other developers thought (https://wordpress.org/support/topic/sync-with-simple-view-counts).


    bruce30
    Participant

    @bruce30

    Hi @devyncjohnson,
    i hope this topic still open, i like this plugin too., but is it possible that the view count will not increase if the user already view it? i min i have 8 members inside the group forum. and and view will also be 8 only if all of them already view the topic that ived created? please help.


    jezza101
    Participant

    @jezza101

    I started reading the topic and thought, hold on, Im sure I wrote a plugin for that!

    Anything I can do to make it better? 🙂


    @bruce30
    do you mean like a unique view count? This starts to get tricky, you’d need a way to uniquely identify users, and then you’d need to track who has seen them. Even if WP had a way to track this it would be veeeery slow.

    @jezza101,


    @bruce30
    already posted in the support part of your plugin, so you could help him there 🙂
    And for the very slow part, how about browser headers that already give you information to more or less find unique users ? I don’t think he is looking for something 100% foolproof.

    Pascal.


    jezza101
    Participant

    @jezza101

    Thanks. Yeah, I don’t check the forum that often *sorry*. I’ll look now.

    So make some kind of finger print based on available info? Seems plausible. Yeah, I guess it doesn’t have to be fool proof but it handles the case where someone hits refresh a couple of times.

    The performance issue I would be worried about is that on every page load I’d have to check against a list of all previous views so I know whether to increase the counter or not. Maybe it would work OK, it would just be an exists check and if indexed well perhaps MySQL would handle it well. On a site with millions of visitors it could be a big search on each page load?


    jezza101
    Participant

    @jezza101

    OK, so it looks like the request is for member views, which means logged in users. That is much easier to identify.

    The problem is that this is a fairly niche case, it’s unlikely that many users of this plugin want a count of members only.

    I could add it is an option but then the plugin isn’t really “simple” any more. Let me have a think about it 🙂


    @devyncjohnson
    That’s a great idea by the way. I like the idea of a little panel on the main dashboard with a few stats. Let me have a think about this.

    The plugin hasn’t been updated because it hasn’t really needed any changes, as far as I know it still works and the idea is to keep it simple. But some admin stats is a neat idea. I love the idea of core bbPress having view counts but bbPress development has ground to a halt, which is disappointing especially after a bunch of us stumped up some cash to support the further development of bbPress.


    bruce30
    Participant

    @bruce30

    hi @jezza101,
    thank you for your response 🙂 i already posted a reply on your plugin support page, Link
    Thanks @casiepa 🙂


    rogerlridge
    Participant

    @rogerlridge

    Hi all,is there a way to use this plugin as a live hit counter for forums or does it only work by a user visiting the forum and leaving or what way does it work can anyone explain please? Thanks in advance


    blogxkomo
    Participant

    @blogxkomo

    this still work for bbpress now?


    defiance12
    Participant

    @defiance12

    I got this working using @devyncjohnson method however, I have an issue with the cache crawler counting as a view every time the page cache expires. Is there a way to filter the server’s ip or the user agent?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar