[TYPO3] list most popular pages

bernd wilke xoonsji02 at sneakemail.com
Wed Sep 3 17:10:24 CEST 2008


on Wed, 03 Sep 2008 13:19:32 +0200, Rob De Vries wrote:

> Hey all,
> 
> Looked all over the internets, but did not find a simple solution to
> list the x most popular pages of a website.
> 
> I would presume there is already a plug&play ext. for this, but the only
> one I have found, th_popular, is not an option because de_php is marked
> as hazardous (and not available in the ter anymore).
> 
> anyone has an alternative?

I have done a similar ext for a website:
an invisible, uncached fe_plugin, which increments a counter on each 
pagecall
and secondly a teaser-list based on these counters.

drawback: if you have variable content (a list with pagebrowser or a 
plugin like tt_news, with changable content) you got wrong values.

you should evaluate server-log to count page-calls with full paramter-
list and also then you will got wrong values because of POST-params of 
forms.
Because of this you should have the possibility to exclude some pages 
from scoring.

the rest is easy:
SELECT uid,title,... 
	FROM pages 
	WHERE enablefields(pages) 
	ORDER BY score DESC 
	LIMIT 0,10


bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list