Maarch Framework 3/Developer handbook/Stats

De Maarch // Wiki.

Aller à : Navigation, rechercher
Warning.gif Cette section du wiki est en cours de restructuration et de rédaction. Nous nous excusons pour la gêne occasionnée.
This section of the wiki is under heavy restructuring and writing. We're sorry for the inconvenience.

Sommaire

Summary

Installation

Quick Install

The tables for this module are defined in the file stats/sql/structure/ directory depending on your databasetype, and the mimimal data in the stats/sql/data/ directory. For the moment, we provide only mysql and postgresql scripts, but it is not difficult to build script for other database with existing scripts.

To load the module just add these lines in the apps config.xml file in the MODULES section :

<MODULES>
  <moduleid>stats</moduleid>
  <comment>_STATS</comment>
</MODULES>

Be sure that the loaded tag is at true in the stats/xml/config.xml file, otherwise the services will not be activated.

Settings

config.xml file

<?xml version="1.0" encoding="utf-8"?>
<root>
	<CONFIG>
		<name>stats</name>
		<comment>_STATS</comment>
		<file_prefix>sc</file_prefix>
		<loaded>true</loaded>
	</CONFIG>
	<TABLENAME>
	</TABLENAME>
</root>

Provided Services

Service Type System Service Description
#view_stats menu yes Adds a "Stats" entry in the menu

view_stats

Adds a "Stats" entry in Maarch menu.

<SERVICE>
   <id>view_stats</id> <!-- if servicetype = menu, this id must be equal to the id of the menu item -->
   <name>_VIEW_STATS</name>
   <comment>_VIEW_STATS</comment>
   <servicetype>menu</servicetype>
   <system_service>true</system_service>
   <enabled>true</enabled>
</SERVICE>

Customisation

Language