2 sam2kb Jan 03, 2011 03:31
![](https://forums.b2evolution.net/media/users/sam2kb/profile_pictures/.evocache/daemon-250.jpg/crop-top-80x80.jpg?mtime=1372015408)
[url=http://www.boogdesign.com/b2evo/index.php/links-for-january-2nd?blog=4]Here it is[/url].
Rob
After updating a week ago, I realized today that view counts do not update.
Is there a solution yet?
Thanks!
Gerard
My skin does not have its own _item_content.inc.php, it's using the default one.
Rob
Ditto. My _item_content.inc.php is up to date and my skin (Simple Zen) uses the default
What about FTP access, can I login and check what's going wrong?
Sure. Give me an email address to send the log-in data.
Are U using Dreamweaver or another program? (Just so I know what to send you)
Can you PM it to me?
All I need is hostname to connect to, username and password
ps I removed your email
Did you get it?
Yes, I got your message. I'll check the server later today.
Good. Hope you find something.
G. >>de nederlandse mafia...
Thanks to GerardP I found a problem in b2evo. I'll try to fix it in next few days.
In two words, b2evo doesn't count views because it marks them as page refresh.
Hit::is_new_view() is false
We all love problems, however, we love even more to fix them. THX SAM for figuring this one out.
Awaiting any suggestions you may have.
THX.,
GP
Anything yet????
GerardP wrote:
Anything yet????
I'm on 4.0.5, and I'm having the same problem, so if it was fixed in 4.0.3, it didn't carry over. It's been a few months since anyone posted in here, so I'm hoping that a fix is out there somewhere.
Stace
AFAIK it's not fixed yet.
Is there any progress yet? I got the same issue over here with v 4.0.5.
sam2kb wrote:
AFAIK it's not fixed yet.
If it's not fixed in the main version, is there at least a quick fix we can do on our own? It seems like it would jut be a matter of replacing a variable in the skin file with the variable that shows browser hits on the admin stats page.
Stace
It should be fixed in the upcoming release.
I personally don't know of any working patch fo this issue.
Same issue here and I am using the latest version... "No views"
It looks like this is fixed in v4.1, there's also a new feature added to count user sessions, which is actually more precise.
sam2kb wrote:
It looks like this is fixed in v4.1, there's also a new feature added to count user sessions, which is actually more precise.
That's great news! Any idea when 4.1 is coming out?
There's only one person who can answer your question, and that's not me :)
You can read b2evo news on twitter
http://twitter.com/#!/b2evolution
sam2kb wrote:
It looks like this is fixed in v4.1, there's also a new feature added to count user sessions, which is actually more precise.
Well, 4.1.1 is out, and I've upgraded to it, but my views are still showing up as 0. I suspect that my custom skin (based on Purple Beauty) is not smart enough to know what changes need to be made to use the fixed count or the user session count. Sam2kb, can you (or anyone) point me to where I can find information about what to change in my skin?
Thanks,
Stace
I didn't find anything in default Purple Beauty skin that can disable view counter. Did you add any custom *.php files to the skin?
Try this, edit the following in index.main.php
global $shutdown_count_item_views;
while( $Item = & mainlist_get_item() )
{ // For each blog post, do everything below up to the closing curly brace "}"
// Increment view count on ALL posts
$shutdown_count_item_views[] = $Item->ID;
sam2kb wrote:
I didn't find anything in default Purple Beauty skin that can disable view counter. Did you add any custom *.php files to the skin?
No, I didn't add any custom *.php files, but I did modify many of them.
sam2kb wrote:
Try this, edit the following in index.main.php
global $shutdown_count_item_views; while( $Item = & mainlist_get_item() ) { // For each blog post, do everything below up to the closing curly brace "}" // Increment view count on ALL posts $shutdown_count_item_views[] = $Item->ID;
I tried that, but it didn't make any difference.
Here's the section of code from my skin's index.main.php file that actually displays the number of views:
<div class="bSmallPrint">
<?php
$Item->issue_time( array(
'before' => ' ',
'after' => '',
'date_format' => 'M d Y',
));
echo ', ';
$Item->wordcount();
echo ' '.T_('words');
echo ', ';
$Item->views();
?>
I can see that the variable it's trying to display is just "views()". Is that the correct variable to display in 4.1.1?
As always, thanks for your help.
Stace
I believe it's correct. You can also find post views in backoffice when viewing full posts.
Can you PM me FTP access to your server so I can check where the script breaks?
sam2kb wrote:
Can you PM me FTP access to your server so I can check where the script breaks?
Unfortunately, I can't. It's behind a municipal government firewall. :(
I did notice this, though. I browsed the skins on the demo server and found one that works correctly with 4.1.1 running on that server: andreas_01.
I downloaded and installed andreas_01 on my production server, and I'm now getting "1 view" on the top post of the main page. I switched back to my skin, and I'm still seeing "1 view" on the top post. I switched to a different machine to force a new session and it incremented to 2 views, other posts I looked at are still showing "No views". I guess it's sort of working after the code change you suggested above. I'll keep an eye on it and report back.
Thanks,
Stace
You can easily check counters by pointing several browsers to your blog
http://browsershots.org/
Also note that if you open a category only the first post (the top one) increases its counter, so for test purposes you should point browsers to a single post
sam2kb wrote:
You can easily check counters by pointing several browsers to your blog
http://browsershots.org/
That's handy! I'll remember that for later. Unfortunately, since this server is not publicly accessible yet, it won't do me a lot of good. I can have a bunch of different users go to specific posts, though, and watch to see if the individual post numbers increment.
Thanks again. I'll let you know what I find out.
Stace
Post your views and ideas in this section only..
Can you give a link to the post? This looks like a bug.