Recent Topics

1 Feb 25, 2006 05:25    

I've checked the top articles hacked available on the plugins section but it doesn't work for me.
This is the one:
http://www.deadbeef.com/index.php/b2evolution_top_articles_hack

From there, I was able to create a select statement that gets me the top most visited articles; however, for the love of me I don't know how to parse it so that I can display a list within my skin.

The SQL Statement is this:

SELECT visitURL, count( * ) AS count
FROM evo_hitlog
WHERE hit_ignore NOT 
IN (
'invalid', 'rss', 'robot'
)
AND visitURL NOT REGEXP '/[0-9]*$'
GROUP BY visitURL
ORDER BY 2 DESC 
LIMIT 5

Can anybody helped me create the rest of the shell so that I can display the top five articles on my skin?

My Version of evo is: b2evo v 0.9.1

I tried googling on php select query but I can't just figure out how to pass the query to evo, and then echo out each row.
I know i could create a connection, and then run the query, and etc. but there's got to be an easier way. HOpefull someone can complete this query...

Thanks in advance

2 Dec 03, 2006 22:04

I updated to 1.8.5 and I have this sql query that I used to get my "most visited". I translated it into the new format but I am not getting the same type of results. Can anyone help me out?

I also tried looking for a hack or plugin but couldn't find it. This would be a nice to have for 1.8.5

OLD sql CODE


SELECT visitURL, referingURL, count( * ) AS count
FROM evo_hitlog
WHERE hit_ignore NOT 
IN (
'invalid', 'rss', 'robot'
)
AND visitURL NOT REGEXP '/[0-9]*$'
GROUP BY visitURL
ORDER BY 3 DESC 
LIMIT 20 

NEW sql ONE


select hit_uri, count(*) as TheCount
FROM evo_hitlog
where hit_referer_type NOT IN ('search', 'blacklist', 'referer')
and hit_uri NOT REGEXP '/[0-9]*$' 
group by 'hit_uri'
ORDER BY 2 DESC 
LIMIT 20 
 

My Top URLS are:
/blog/xmlsrv/rss2.comments.php?blog=1
/blog/xmlsrv/rss2.php?blog=1
/blog/xmlsrv/atom.php?blog=1
/blog/xmlsrv/atom.php?blog=5

but I want to get the actual article URIs...

I hope you can help.

Edgar.


Form is loading...