DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Popular pages¶
Created: | 2011-03-22T16:10:41 |
---|---|
Changed: | 2011-04-08T10:56:02.620000000 |
Classification: | vd_popular |
Description: | The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- |
Keywords: | popular, page, statistics, list |
Author: | Cédric Aellen |
Email: | support.typo3@vd.ch |
Info 4: | |
Language: | en |
Popular pages - vd_popular
Popular pages¶
Extension Key: vd_popular
Language: en
Keywords: popular, page, statistics, list
Copyright 2000-2011, Cédric Aellen, <en>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
`Introduction 3 <#__RefHeading__3185_137784399>`_
`Users manual 5 <#__RefHeading__2959_1199919493>`_
`Administration 6 <#__RefHeading__2507_1768060277>`_
`Configuration 10 <#__RefHeading__3199_137784399>`_
`Known problems 13 <#__RefHeading__3207_137784399>`_
`To-Do list 14 <#__RefHeading__3209_137784399>`_
`ChangeLog 15 <#__RefHeading__3211_137784399>`_
`Forge 16 <#__RefHeading__4457_1768060277>`_
Introduction¶
What does it do?¶
- This extension will display a list of most popular pages.
- The number of visits for each page is stored in the database. There is a system that erease records after a configurable number of days. This helps avoid overloading the database
- You can exclude pages
- You can diplay the top popular pages for a certain portion of the site by using startingpoints.
Users manual¶
- Install the extension
- Create an extension template or edit an existing one. (see Extension
template)
- Add the typoscript to include the counter on every page
- Include static
- In the extension configuration, set the number of days you want to keep the statistics. The extension created a records per day for each page that was visited at least once. Be careful not to overload your database!
- Place the plugin on a page. By default, it displays the pages below the current page.
- You can configure the following parameters:
- Exclude pages so that they do not appear in the list.
- Set a page number to display.
- By changing the startingpoint, it is possible to view the most popular pages of another section of the site.
- Here it is !
Administration¶
The extension contains two plugins.
pi1 is the plugin that allows to count the visits. It must be inserted on the pages where you want to count the visits.
pi2 is the plugin that generates the view.
Counter (pi1)¶
Extension template¶
You have to creat a template (or edti existing templates) for pages where you want to count visits. In the TypoScript setup, insert the counting plugin (pi1) on all pages.
Here is a exemple code : page.1000 < plugin.tx_vdpopular_pi1. The number following “page” must not already be used in the typoscript setup.
You also need to include the static from extension to load the typoscript
View (pi2)¶
Number of days of statistics¶
You must be very careful about the number of records that the extension will create in the database.The extension will save a record for each page and each day if the page has been visited at least once.This means that if the site has a thousand pages. If all pages have been visited at least once after a week the table will contain seven thousand records.
Be careful to properly configure the number of days of stats you want to keep in the configuration of the extension. For security reasons, you can not set a period exceeding thirty days. By default, the extension keeps track of the last seven days. Records that exceed this limit are deleted.
Hard-coded Security¶
An hard-coded security prevents to displays page list containing over 100 items. This helps to prevent too large queries on data Abse. This allows to not have too large queries on the database.
You can find this security in /pi2/class.tx_vdpopular_pii2.php
$pagestoshow=$pagestoshow>100?100:$pagestoshow;
Cache¶
The view plugin is cached. It takes time for the extension to get the page tree to count visits on children pages. The view slow down the page generation. This is why it is cached.
The list is updated as the frequency of updating the cache.You can change the frequency of the cach in the settings page.
Things to be careful¶
It can be diffucult for the plugin to generate the list if there's a lot of pages that can be found in the Starting point.
The test was done with a site with 15000 pages where the plugin can not generate the list. We recommend you make a list of popular pages per section of the site if you have lots of page.
User & group settings¶
The pi1 plugin generate tx_vdpopular_counter records on every pages. Users can not delete a page if they have not rights to delete these reords.
It can be set in the group or user rights settings.
If you do not want the users to view the tx_vd_popular_counter table in the backend, you can add this Tsconfig in user or group settings :
mod.web_list.hideTables = tx_vdpopular_counter
You will found the documentation here : http://typo3.org/documentation/document- library/references/doc_core_tsconfig/4.1.0/view/1/3/#id3973413
Configuration¶
Static Template¶
When starting to configure the extension you should create a separate TS extension template for it where you do all the configuration for this extension. That extension template can then get included in the root template. In the extension template add the static TS configuration, otherwise it wont work!
Reference¶
excludedPages¶
Property
excludedPages
Data type
string
Description
ID of pages (separated by commas) that are excluded from the display
Default
pagesToShow¶
Property
pagesToShow
Data type
integer
Description
Number of page to display
Default
5
depth¶
Property
depth
Data type
integer
Description
Depth on which the plugin will display pages.If the depth is set to 10 and that the plugin is placed on a page level 1, it will not display page level 12
Default
10
minVisits¶
Property
minVisits
Data type
integer
Description
Minimum number of visits for a page to be considered as popular
Default
0
templateFile¶
Property
templateFile
Data type
string
Description
Path to the template for the frontend display.
you can use these subparts in your HTML template like
Default
EXT:vd_popular/res/pi2_template.html
[tsref:plugin.tx_vdpopular_pi2]
Template¶
You can find the default template in EXT: vd_popular/res/pi2_template.html.You can reuse it as an example.Copy this file in the folder you want. Eg /fileadmin/templates/extensions/vd_popular/
Tags¶
The following tags are available.
<!-- ###LIST### begin -->¶
Description
The list will be between thes two tags
<!-- ###ITEM### begin -->¶
Description
Defines the beginning and end of each list item.
###PAGE_TITLE###¶
Description
The title of the page.
###PAGE_DESCRIPTION###¶
Description
The description of the page.
This is the description field that you find in the metadata when you edit any page.
###LINK###¶
Description
Link wrap
<p><!--LINK-->Click here !<!--LINK--></p>
###COUNTER###¶
Description
The number of visits
###TEXT1###¶
Description
If you need to put some text you can use these tags.
To creat your own localisation, you have to creat a locallang.xml files
eg for french :
creat the following file : typo3conf/ext/l10n/fr/vd_popular/pi2/fr.localang.xml
<?xml version="1.0" encoding="utf-8" standalone="yes" ?><T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for plugin "tx_vdpopular_pi2"</description>
</meta>
<data type="array">
<languageKey index="fr" type="array">
<label index="TEXT1">My texte in french</label>
<label index="TEXT2">Another text in french</label>
<label index="NO_RECORDS_TEXT">Some text in french again</label>
</languageKey>
</data>
</T3locallang>
<!--###NO_RECORDS### begin -->¶
Description
The template display if there is no records will be between these two tags
###NO_RECORDS_TEXT###¶
Description
Text if there is no records.
For translation see ###TEXT1### and ###TEXT2###
Example¶
Here as an example the default template.
<html>
<head>
<title>pi1 plugin template file</title>
</head>
<body>
<!-- ###LIST### begin -->
<olclass="popular-pi1">
<!-- ###ITEM### begin -->
<li>
<!--###LINK###-->###PAGE_TITLE###<!--###LINK###-->###TEXT1### ###COUNTER### ###TEXT2###<br/>
###PAGE_DESCRIPTION###
</li>
<!-- ###ITEM### end -->
</ol>
<!-- ###LIST### end -->
<!-- ###NO_RECORDS### begin -->
<ol>
<li>###NO_RECORDS_TEXT###</li>
</ol>
<!-- ###NO_RECORDS### end -->
</body>
</html>
Known problems¶
None (Let us know if you find some problems → http://forge.typo3.org/projects/extension-vd_popular)
To-Do list¶
- Add “templateFile” in plugin settings
- Add “depth” in plugin settings
- Hard-coded security can be disable in extension settings (see Hard- coded Security).
ChangeLog¶
See Changelog file
Forge¶
If you have questions or request, please use the forge.
http://forge.typo3.org/projects/extension-vd_popular
16