Le Probleme
C’est que si vous utilisez une structure des permaliens o? l’id du billet n’est pas pr?sente, telle que celle-ci:
/%year%/%monthnum%/%day%/%postname%/
L’id du billet n’est pas ajout?e la table de Stat Traq, ce qui fait que mon plugin Populaires ne comprend plus ce qu’il lui arrive. La solution est en fait tr?s simple
La Solution (j’esp?re)
Dans le fichier stattraq.php, vous trouverez les lignes suivantes (25 et 26)
if (($p != ”)){
$p = intval($p);
Mais la variable $p n’existe que si le billet est s?lectionn? par son id. S’il a ?t? selectionn? par nom, $p est nul.
Il faut donc remplacer les lignes ci-dessus par celles-la
if (($post->ID != ”)){
$p = intval($post->ID);
Et ?a a l’air de marcher avec tous les sch?mas de r??criture.
5 Responses to “Avis aux utilisateurs des extensions pour StatTraq”
RSS feed for comments on this post. TrackBack URL









est-ce qu’un simple “global $id” pour ensuite utiliser $id dans stattraq ne suffirait pas ?
$id est toujours connu (c’est en gros le $_GET['p'], renseign? m?me avec une structure de permalien comme d?crite ici)
I have instituted the StatTraq extensions for user using Permalinks (Me). I was wondering if you have ever modded STatTraq or any other tool so that it will display the post names and number of hits. I have used you Popular Post plugin – but I figured you might have also hacked the backend so that when you open StatTech it actually show pages and hits rather than the default “multiple posts”.
Any help you might offer would be greatly appreciated,
hello !
I think the correct way is with
if (is_single() && $post->ID!=”)
because of when you load a category, the last $post printed is the $post that stattraq gets.
plugin works great! one question: how can i get rid of the blank entries that the query lists? none of my posts have blank titles (nor does wp allow without creating its own slug for you) check it out:
http://whiffer.net/top-10/
any suggestions would be appreciated.
Oui, c’est vrai, ?a marcherait aussi, et c’est peut ?tre plus simple mettre en oeuvre.