.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ============= 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 |img-1| |img-2| Popular pages - vd\_popular .. _Popular-pages: Popular pages ============= Extension Key: vd\_popular Language: en Keywords: popular, page, statistics, list Copyright 2000-2011, Cédric Aellen, 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: Table of Contents ----------------- `Popular pages 1 <#__RefHeading__3183_137784399>`_ **`Introduction 3 <#__RefHeading__3185_137784399>`_** `What does it do? 3 <#__RefHeading__3187_137784399>`_ `Screenshots 3 <#__RefHeading__3189_137784399>`_ **`Users manual 5 <#__RefHeading__2959_1199919493>`_** **`Administration 6 <#__RefHeading__2507_1768060277>`_** `Counter (pi1) 6 <#__RefHeading__2509_1768060277>`_ `View (pi2) 7 <#__RefHeading__2963_1199919493>`_ `User & group settings 8 <#__RefHeading__946_211566745>`_ **`Configuration 10 <#__RefHeading__3199_137784399>`_** `Static Template 10 <#__RefHeading__3432_137784399>`_ `Reference 10 <#__RefHeading__3203_137784399>`_ `Template 10 <#__RefHeading__3205_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: Introduction ------------ .. _What-does-it-do: 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. .. _Screenshots: Screenshots ^^^^^^^^^^^ .. _Backend: Backend """"""" |img-3| .. _Frontend: Frontend """""""" |img-4| |img-5| .. _Users-manual: 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: 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: Counter (pi1) ^^^^^^^^^^^^^ .. _Extension-template: 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. |img-6| You also need to include the static from extension to load the typoscript |img-7| .. _View-pi2: View (pi2) ^^^^^^^^^^ .. _Number-of-days-of-statistics: 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: 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: 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. |img-8| 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: 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: 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. |img-9| 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 |img-10| You will found the documentation here : `http://typo3.org/documentation/document- library/references/doc\_core\_tsconfig/4.1.0/view/1/3/#id3973413 `_ .. _Configuration: Configuration ------------- .. _Static-Template: 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! |img-11| .. _Reference: Reference ^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _excludedPages: excludedPages """"""""""""" .. container:: table-row Property excludedPages Data type string Description ID of pages (separated by commas) that are excluded from the display Default .. _pagesToShow: pagesToShow """"""""""" .. container:: table-row Property pagesToShow Data type integer Description Number of page to display Default 5 .. _depth: depth """"" .. container:: table-row 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: minVisits """"""""" .. container:: table-row Property minVisits Data type integer Description Minimum number of visits for a page to be considered as popular Default 0 .. _templateFile: templateFile """""""""""" .. container:: table-row 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 .. ###### END~OF~TABLE ###### [tsref:plugin.tx\_vdpopular\_pi2] .. _Template: 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: Tags """" The following tags are available. .. ### BEGIN~OF~TABLE ### .. _LIST-begin: ~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Tags Description The list will be between thes two tags .. _ITEM-begin: ~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Tags Description Defines the beginning and end of each list item. .. _PAGE-TITLE: ###PAGE\_TITLE### ~~~~~~~~~~~~~~~~~ .. container:: table-row Tags ###PAGE\_TITLE### Description The title of the page. .. _PAGE-NAVTITLE: ###PAGE\_NAVTITLE### ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Tags ###PAGE\_NAVTITLE### Description The navigation title of the page. .. _PAGE-DESCRIPTION: ###PAGE\_DESCRIPTION### ~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Tags ###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: ###LINK### ~~~~~~~~~~ .. container:: table-row Tags ###LINK### Description Link wrap

Click here !

.. _COUNTER: ###COUNTER### ~~~~~~~~~~~~~ .. container:: table-row Tags ###COUNTER### Description The number of visits .. _TEXT1: ###TEXT1### ~~~~~~~~~~~ .. container:: table-row Tags ###TEXT1### ###TEXT2### 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* ** ** *module* *Language labels for plugin "tx\_vdpopular\_pi2"* ** ** ** ** ** ** ** ** ** .. _NO-RECORDS-begin: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Tags Description The template display if there is no records will be between these two tags .. _NO-RECORDS-TEXT: ###NO\_RECORDS\_TEXT### ~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Tags ###NO\_RECORDS\_TEXT### Description Text if there is no records. For translation see ###TEXT1### and ###TEXT2### .. ###### END~OF~TABLE ###### .. _Example: Example """"""" Here as an example the default template. pi1 plugin template file
  • ###PAGE\_TITLE######TEXT1### ###COUNTER### ###TEXT2###
    ###PAGE\_DESCRIPTION###
    1. ###NO\_RECORDS\_TEXT###
    .. _Known-problems: Known problems -------------- None (Let us know if you find some problems → http://forge.typo3.org/projects/extension-vd\_popular) .. _To-Do-list: 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: ChangeLog --------- See Changelog file .. _Forge: Forge ----- If you have questions or request, please use the forge. http://forge.typo3.org/projects/extension-vd\_popular |img-2| 16 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 428 .. :id: images1 .. :name: images1 .. :width: 382 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 228 .. :id: images3 .. :name: images3 .. :width: 259 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 466 .. :id: images9 .. :name: images9 .. :width: 564 .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 617 .. :id: images4 .. :name: images4 .. :width: 440 .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :height: 467 .. :id: images5 .. :name: images5 .. :width: 466 .. |img-8| image:: img-8.png .. :align: left .. :border: 0 .. :height: 426 .. :id: images6 .. :name: images6 .. :width: 552 .. |img-9| image:: img-9.png .. :align: left .. :border: 0 .. :height: 614 .. :id: images7 .. :name: images7 .. :width: 300 .. |img-10| image:: img-10.png .. :align: left .. :border: 0 .. :height: 84 .. :id: images8 .. :name: images8 .. :width: 365 .. |img-11| image:: img-11.png .. :align: left .. :border: 0 .. :height: 174 .. :id: images2 .. :name: images2 .. :width: 600