Main Page   File List   File Members   Related Pages  

stats_text.php

Go to the documentation of this file.
00001 <?php
00002 // $Header: /cvsroot/modphpcms/modphpcms/modules/stats_text.php,v 1.2 2004/05/04 22:33:17 fred87 Exp $
00003 
00004 function stats_text_install()
00005 //{{{
00006 {
00007         $info['name'] = 'stats_text';
00008         $info['title'] = 'Text Counters';
00009         $info['description'] = 'Provides support for text output of counter values';
00010         $info['has_admin'] = 0;
00011         $info['enabled'] = 1;
00012         set_module_info($info);
00013         
00014         $hooks = get_entry('hooks', 'DoStats');
00015         ListAdd('stats_text', $hooks);
00016         set_entry('hooks', 'DoStats', $hooks);
00017 
00018         module_installed();
00019 }
00020 //}}}
00021 function stats_text_uninstall($preserve_data)
00022 //{{{
00023 {
00024         delete_module('stats_text');
00025 
00026         $hooks = get_entry('hooks', 'DoStats');
00027         ListDel('stats_text', $hooks);
00028         set_entry('hooks', 'DoStats', $hooks);
00029 }
00030 //}}}
00031 function stats_text_DoStats($id)
00032 //{{{
00033 {
00034         $info = get_module_info('stats_text');
00035         if (!$info['enabled'])
00036                 return;
00037                 
00038         $config = get_entry('stats_config', $id);
00039         if (get_option($config, 'style') != 'text')
00040                 return; // for a different module
00041         
00042         if (get_option($config, 'showpre') == 'y')
00043                 print get_option($config, 'pretext');
00044         
00045         print Istats_getCount($id);
00046 }
00047 //}}}
00048 ?>

Generated on Wed Jun 9 03:38:16 2004 for modphpcms by doxygen1.2.18