Recent Topics

1 Sep 12, 2015 23:50    

I had a piece of code in my bSmallHead block which showed how many times a post had been viewed. I'm not sure why but it stopped working after the 6.6.3 upgrade on my local machine. This is the code which displayed it:

		<?php
		// Permalink:
		$Item->issue_date( array(
				'before'    => '<span class="date">Published on ',
				'after'     => ' ',
			));
		$Item->issue_time( array(
				'before'    => ' @ ',
				'after'     => '</span>',
			));
		?>
	using  
		<?php
		$Item->wordcount();
		echo ' '.T_('words');
		echo ', and has ';
		$Item->views();
		?>

Am I simply missing a plugin on my local environment, or is it something else?

jj.

2 Sep 13, 2015 12:35

That's something I noticed too on the 6.x versions - though I'm not overly concerned about numbers, it did at least give me a very quick front end view as to whether a post was being hit at all, and if the numbers were high, whether the 'bots' had latched onto it.

3 Sep 13, 2015 12:39

It's worth noting that I never added any code to get this - it could have been built into the skin I was using though.

5 Sep 13, 2015 14:38

That's really a shame, it was a very useful visual detail and never caused me any performance issues.
Are those stats still recorded in the db or were they wiped on upgrade?
If they're still there it's possible we could write a plugin.

jj.

6 Sep 13, 2015 14:48

@jibberjab I'm afraid the post_views field was removed from the T_items__item table during the upgrade. If you have a previous backup of your database, you can restore it and write that plugin.

Please let us know if you do it, we would be very interested on helping you with that.

Thanks.

7 Sep 13, 2015 15:58

@mgsolipa

I have a suggestion to the entire Dev Team of B2evo. Why not bring back the post_views function in the next version with the following implementation:

Option to disable / enable post_views - In this manner the administrator can simply toggle the feature if there will be a sudden spike of traffic on their sites.

8 Sep 13, 2015 20:03

@dh.com wrote earlier:


Option to disable / enable post_views - In this manner the administrator can simply toggle the feature if there will be a sudden spike of traffic on their sites.

I was going to suggest something similar. There is apparently interest in this feature, and not all hosts are created equal. That means that while not all sites can handle it, not all sites will be negatively affected either. It should be up to the individual site owner to choose, based on their situation and preference...

9 Sep 14, 2015 00:30

Why not bring back the post_views function in the next version with the following implementation:
Option to disable / enable post_views

I had the same suggestion as @dh.com, which I read now after login ... and YES, we want/need this feature.

10 Sep 14, 2015 14:51

We can bring it back but only if we count all impressions of a post, including when robots request the page or when the same user requests the same page 3 times. This will create higher view counts than if we counted only humans. Is that ok?

Note: we can counts views from logged-in users separately. This will be a real count (no more than 1 view per user).

11 Sep 14, 2015 15:08

Personally I think that would be great. Can you provide separate tags and a 3-way toggle?

  1. View counts off
  2. Count logged-in views only
  3. Count all views

I presume filtering hits by IP would create too much stress, so it has to include repeat hits?

If we have backups of pre-5.1, will we be able to import the proper column into the current db? If so, will you be able to provide an instruction for how to do so? Spending a few minutes writing out a guide up-front will save lots of repetitive "How do I import old data?" forum threads later.

If we're upgrading directly from pre-5.1 to 6.x, will it simply bring the old viewcount data with it during upgrade, or will this require starting from zero?

jj.

12 Sep 14, 2015 17:32

@fplanque I'm pretty sure the method @jibberjab described it would work for me too - out of curiosity, though, is this different from the previous implementation, and if so, how?

13 Sep 14, 2015 19:36

The previous method tried not to count multiple views of the same post by the same users, which required heavy parsing of access logs.

15 Sep 06, 2016 06:11

The plugin, with all due respect, does not work. It only (unreliably) shows hits since April 2016, which is - in every sense - useless to most of us.
As far as the decision of FP to disable this function, it is based on silly this vs. that concerns and of no relevance to real life users.
Virtually any CMS (From FB to Twitter to Joomla) shows hit counts and not having them has a real impact on how we manage content.
If this were to be a draw on resources, clearly the way the system operates is flawed.
Just my 2 cts.

16 Sep 06, 2016 17:35

Not a happy bunny then :)

"clearly the way the system operates is flawed"

Is this a view of your unhappiness that the plugin doesn't do what you want or that in general b2evo isn't being managed or built in a way you are happy with.

Do you have lots of time and programming skills to make the sort of changes you want, that would be good. I'm sure FP who does most of the work currently would appreciate some help.

17 Sep 08, 2016 05:22

Not a happy bunny, no programming skills whatsoever, and disappointed that some things that worked fine before do not anymore.
In an ongoing conversation with FP as well.
I have contributed to this platform in the past and would be happy to do so again if any of my actual skills could make a difference.
Not much, it seems.

18 Sep 08, 2016 05:34

View counts - old style

19 Sep 08, 2016 19:00

I'm sorry to say but these old view counts are gone and have been gond for a long time now (v5.1).

You now need to add a view counting plugin if you want to display anonymous view counts.


Form is loading...