Main Page   File List   File Members   Related Pages  

meta_generator.php

Go to the documentation of this file.
00001 <?php
00002 // $Header: /cvsroot/modphpcms/modphpcms/modules/meta_generator.php,v 1.6 2004/05/18 09:23:56 fred87 Exp $
00003 
00004 function meta_generator_install()
00005 //{{{
00006 {
00007         $info['name'] = 'meta_generator';
00008         $info['title'] = 'Generator meta information';
00009         $info['description'] = 'Provides customizable content for the ' .
00010                 '<meta generator /> tag.';
00011         $info['has_admin'] = 1; // false
00012         $info['enabled'] = 1;   // true
00013         set_module_info($info);
00014         set_entry('config', 'meta_generator_info', 'modphpcms + vim + kdevelop');
00015         
00016         $hooks = get_entry('hooks', 'in_head');
00017         ListAdd('meta_generator', $hooks);
00018         set_entry('hooks', 'in_head', $hooks);
00019 
00020         module_installed();
00021 }
00022 //}}}
00023 function meta_generator_uninstall($preserve_data)
00024 //{{{
00025 {
00026         delete_module('meta_generator');
00027 
00028         if (!$preserve_data)
00029                 delete_entry('config', 'meta_generator_info');
00030 
00031         $hooks = get_entry('hooks', 'in_head');
00032         ListDel('meta_generator', $hooks);
00033         set_entry('hooks', 'in_head', $hooks);
00034 }
00035 //}}}
00036 function meta_generator_in_head()       // the actual module code - called by a hook
00037 //{{{
00038 {
00039         $info = get_module_info('meta_generator');
00040         if (!$info['enabled'])
00041                 return;
00042         
00043         $info = get_entry('config', 'meta_generator_info');
00044         echo "<meta name=\"generator\" content=\"$info\" />\n";
00045 }
00046 //}}}
00047 ?>

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