Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[archived] jas_popular_articles: List Popular Articles
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
Because the hpw_most_popular_articles plugin is not available anywere, i decided to write my own popular_articles plugin <a href=“http://textpattern.org/article/625/list-popular-articles”>get it here</a> or <a href=“http://www.larry.org.mx/files/jas_popular_articles.php.txt”>here</a>.
Questions? antonio dot solis at gmail dot com
Last edited by larry (2006-06-26 21:18:07)
—
A mathematician is a device for turning coffee into theorems.
Offline
Re: [archived] jas_popular_articles: List Popular Articles
Very good job larry,
I wrote a pluggin dzd_counter_view to do the same but by using a custom field but you idea to use a log table is great!
Offline
Re: [archived] jas_popular_articles: List Popular Articles
This looks like an interesting plugin but on implementation all I receive is a list of numbers in brackets as an output.
Any idea as to why that may be happening?
using | txp:jas_popular_articles wraptag=“li” limit=“10” range=“m”
Offline
Re: [archived] jas_popular_articles: List Popular Articles
Catalyst,
Well, i dont know how to help you, but i can tell you my txp setup, i’m using the Permanent Link Mode = /title and I’m Logging the Referers Only, maybe you could send me the output via email, and I’ll try to figure it out.
As always, feedback is appreciated.
—
A mathematician is a device for turning coffee into theorems.
Offline
Re: [archived] jas_popular_articles: List Popular Articles
I have the same problem as Catalyst — I’m getting an output with brackets in numbers, such as:
- (57)
- (28)
- (24)
- (22)
- (22)
- (18)
- (18)
- (16)
- (13)
- (11)
My settings are:
Permanent link mode – /section/title
Logging all hits
Offline
Re: [archived] jas_popular_articles: List Popular Articles
I have the same problem. The result I get (as html) is :
<code>
<ul>
<li><a href=“http://www.tilkkusatu.net/”></a> (689)</li>
<li><a href=“http://www.tilkkusatu.net/”></a> (600)</li>
<li><a href=“http://www.tilkkusatu.net/”></a> (426)</li>
<li><a href=“http://www.tilkkusatu.net/”></a> (294)</li>
<li><a href=“http://www.tilkkusatu.net/”></a> (277)</li>
</ul>
</code>
- Logging all hits
- permalink : year/month/day/title
- txp version : 4.0.3 (r1188)
I hope you’ll get this plugin working since it would be nice feature to have.
Edit:
Problem must be in these lines (with safe_row function) since $rs and $rs2 arrays seems to be empty.
<pre>
// Get URLs ordered by number of visits
$rs = safe_rows($what,‘txp_log’, $where . $rest);
// Extract article IDs
foreach ($rs as $data) {
I managed to get this working somehow when I changed it to output the $data[‘page’] variable instead $rs2… Could someone with better skills take a look at this?
Other thing is that I would like to make it filter everything else than articles. Any suggestions how this line should be changed to do that?
<pre> $where = ‘page <> “/” AND page <> “/index.php” ‘ . $range;</pre>
Last edited by pedro (2006-07-18 09:46:42)
Offline
#7 2006-07-26 15:15:01
- Smaavie
- Member
- Registered: 2005-02-07
- Posts: 25
Re: [archived] jas_popular_articles: List Popular Articles
I have the same problem.
Has anyone found a solution?
Offline
Re: [archived] jas_popular_articles: List Popular Articles
me too …
any ideas at this time ??
good magic is better than sex, but harder to find …
http://www.lazarro.de
Offline
Re: [archived] jas_popular_articles: List Popular Articles
is somebody still working on this problem?
or can we delete this not working plugin?
good magic is better than sex, but harder to find …
http://www.lazarro.de
Offline
Re: [archived] jas_popular_articles: List Popular Articles
This plug-in does not work for clean URLs.. on ly messy…
reason is… the first query pulls the page referred and counts the number of times it is referred.
the second search looks for the page referred dropping the leading slash… trouble is, the title of your article in the textpattern table is never going to include the whole URL!
I tried a few things – using strrpos() to find the last slash in the URL and then searching for matches… the trick with that is that you end up with a handful of popular links that are actually displaying… some examples of hits that would not register (popular thought they might be):
/section
/category
/?q=search+word
if it was possible to lock these out then maybe something could work, but I think the other idea of using an article tag replacement that increments a custom field works a lot better in this case.
Sorry for the bad news!
Offline
#11 2006-08-26 05:16:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [archived] jas_popular_articles: List Popular Articles
jagorny: you might try the plugin Dragondz mentioned instead.
Offline
Re: [archived] jas_popular_articles: List Popular Articles
I actually have my own plugin, bit_article_hitlist, that combines the functionality of ort_article_psort and (coincidentally) of dzd_counter_view.
I’d actually be willing to “give” my plugin to Dragondz if he likes and if anyone else would find this useful.
“The neighboring marshmallow factory fared no better, having been unable to absorb the incredible pressure wave.”
Offline