I would like to have a list of links to about five posts on my site that are the most popular or most read posts. Is this possible?
Thanks folks,
Bruce.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 28, 2008 9:42am
Subscribe [4]#1 / Feb 28, 2008 9:42am
I would like to have a list of links to about five posts on my site that are the most popular or most read posts. Is this possible?
Thanks folks,
Bruce.
#2 / Feb 28, 2008 9:59am
Hi Bruce,
If you are using comments then you can use the comments_total parameter.
If you want the most viewed then you can use the track_views parameter also.
There are probably quite a few other ways that you could go about this also but these are two of the in-built ways of doing what you need.
Hope that helps.
Best wishes,
Mark
#3 / Feb 28, 2008 11:14am
Thanks Mark
So if I put
track_views="one"somewhere within my single entry / permalink page (not too sure where though) will that create a different number for each separate entry that appears on that page?
And then can this appear elsewhere and show the top four entries?
{exp:weblog:entries weblog="name" limit="4" orderby={view_count_one}}
{title}
{/exp:weblog:entries}#4 / Feb 28, 2008 11:30am
Hi Bruce,
Yes the track_views=“one” would go into the weblog tag on the single entry page something like this :
{exp:weblog:entries weblog="default_site" track_views="one" limit="1" dynamic="on"}
<h1>{title}</h1>
{body}
{/exp:weblog:entries}and then on a page where you would like to bring back the entries ordered by that track_views=“one” parameter you would do the following :
{exp:weblog:entries weblog="default_site" orderby="view_count_one"}
<h1>{title}</h1>
{body}
{/exp:weblog:entries}That should get you what you need. I must admit that looking back at the documentation for this it is a little confusing as it doesn’t really tell you exactly how to do this.
Hope that helps?
Best wishes,
Mark
#5 / Feb 28, 2008 11:44am
Yes it does help – and yes the original documentation was a little bleak in detail. I have tried to leave posting here as a last resort. Examples are always helpful once you’ve got the general gist of how ee works. So, thanks again (and give my regards to the ‘black’ country, from whence my people come)
#6 / Feb 28, 2008 12:11pm
Hi Bruce,
No problems with the help. That’s what I and many others are here for! 😉
Whereabouts in the Black Country do you hail from then?
Best wishes,
Mark
#7 / Mar 17, 2008 3:53am
Hi Mark,
Thanks man for the introduction of this feature [track views]. I have also been on the lookout for it. It has really made my life a lot easier, because I was even intending writing a script that would do this for me. But I was under conviction that EE might have already thought about a feature like this. Because it is a common feature.
Cheers,
Marks
#8 / May 22, 2008 9:22pm
hi all
track views is a great thing, and should be “activated” by default on weblog post,,
with time,, I came up that making a list of 5 most vived posts and ordering them by [view count] isn’t very good solution, because, lot’s of people are opening that pages, so that number of views is growing and growing.. so the other pages are not so popular, and is very hard to “pull” them up on that list of “5 most readed entries”. and nobody wants that, right?
that is just my opinion 😊
davor
#9 / May 24, 2008 10:49am
Hi Davor
To make “most popular” by a certain time frame, use the “start_on” parameter.
http://expressionengine.com/docs/modules/weblog/parameters.html#par_start_on
<h2>This Month's Most Popular News</h2>
<p><?php<br />
global $LOC;<br />
$start_time = $LOC->decode_date('%Y-%m-%d %g:%i %A', $LOC->now - 2592000); // 2592000 seconds in 30 days<br />
?></p>
<p><ul> <br />
{exp:weblog:entries weblog="news" limit="5" dynamic="off" orderby="view_count_one" start_on="<?php echo $start_time; ?>"}<br />
<?php echo $start_time; ?></p>
<p><li><a href="http://{title_permalink=news/entry}">{title} ({view_count_one} views)</a></li><br />
{/exp:weblog:entries} <br />
</ul></p>
<p></div>Let me know if that works out for you.
#10 / May 24, 2008 11:21am
Hi Richard!
Yes,, this is working..
I din’t notice that I can use that parameter before, at least not at this solution 😊
now the most popular has sense 😊
thank you
#11 / Sep 30, 2008 6:45pm
after a period,, this solution that Richard provided is not the right one, because, iy you dont have sufficient click on the other products, this top 5 are almost 2 weeks the same (I used 4 days in start_on).
is there better solution to make this? Mark? Richard? 😊
thanx
#12 / Sep 30, 2008 6:50pm
Hi Mark,
Thanks man for the introduction of this feature [track views]. I have also been on the lookout for it. It has really made my life a lot easier, because I was even intending writing a script that would do this for me. But I was under conviction that EE might have already thought about a feature like this. Because it is a common feature.
Cheers,
Marks
No problem at all. Glad it helped 😉
after a period,, this solution that Richard provided is not the right one, because, iy you dont have sufficient click on the other products, this top 5 are almost 2 weeks the same (I used 4 days in start_on).
is there better solution to make this? Mark? Richard? 😊
thanx
Not really too sure what you are looking for here? Is it because if you place a top 5 list that then people go and click on them so they become even more popular? If so then this is the nature of the beast I’m afraid. Anywhere where you show most popular posts people are going to be more aware of them and will probably click on them.
One way you could possibly get around this is to limit to 5 but maybe one week offset by 5 so you get a different 5 entries instead. Something like that perhaps?
Not perfect but an idea maybe?
Best wishes,
Mark
#13 / Sep 30, 2008 7:14pm
Not really too sure what you are looking for here? Is it because if you place a top 5 list that then people go and click on them so they become even more popular? If so then this is the nature of the beast I’m afraid. Anywhere where you show most popular posts people are going to be more aware of them and will probably click on them.
One way you could possibly get around this is to limit to 5 but maybe one week offset by 5 so you get a different 5 entries instead. Something like that perhaps?
Not perfect but an idea maybe?
Best wishes,
Mark
Yes, that I sad in my post, few messages above, but then Richard posted that “start_on” solution. that is partial solution because it limits the period.
it’s right what you sad Mark, it’s hard to have it in the way the author of the topic and I need this, but I think that there is no solution, as you sad, the beast 😊
or maybe put more time, for example month, and maybe after that we could see some change 😊
I dont know,, for know I disabled that feature on the site.
thanx
dp
#14 / Sep 30, 2008 7:17pm
Another thought on this would be to roll out your own database table to store hits and then where you place your list of popular entries just make it so that anyone going to the entry from that doesn’t make the count increment.
Not perfect but another way you could possibly go about it. This way you would be reliant upon hits from people finding the posts instead of being shown them.
You may be able to use the AJAX Linktracker module to help you on your way.
Just a thought though.
Best wishes,
Mark
#15 / Sep 30, 2008 7:31pm
thank you very much for interest in this.. I was thinking creating another page without counting, but it’s not so big deal, I was just searchin IF there is a “simple” solution, I can live with the one I’m using now.
this ajax gadget looks cool, but right now I don’t think that I need him.
thanx again Mark