Main Page   File List   File Members   Related Pages  

copyright.php

Go to the documentation of this file.
00001 <?php
00002 // $Header: /cvsroot/modphpcms/modphpcms/modules/copyright.php,v 1.2 2004/05/04 22:33:17 fred87 Exp $
00003 
00004 function copyright_install()
00005 //{{{
00006 {
00007         $info['name'] = 'copyright';
00008         $info['title'] = 'Provides copyright notices';
00009         $info['description'] = 'This module provides copyright notices.';
00010         $info['has_admin'] = 1;
00011         $info['enabled'] = 1;
00012         set_module_info($info);
00013 
00014         set_entry('config', 'copyright_base', 'Copyright &#169; 2004 '
00015                 . '<a href="mailto:fred87@users.sf.net">Fred Emmott</a>');
00016         
00017         $hooks = get_entry('hooks', 'at_bottom');
00018         ListAdd('copyright', $hooks);
00019         set_entry('hooks', 'at_bottom', $hooks);
00020 
00021         module_installed();
00022 }
00023 //}}}
00024 function copyright_uninstall($preserve_data)
00025 //{{{
00026 {
00027         delete_module('copyright');
00028 
00029         if (!$preserve_data)
00030                 delete_entry('config', 'copyright_base');
00031 
00032         $hooks = get_entry('hooks', 'at_bottom');
00033         ListDel('copyright', $hooks);
00034         set_entry('hooks', 'at_bottom', $hooks);
00035 }
00036 //}}}
00037 function copyright_at_bottom()  // the actual module code - called by a hook
00038 //{{{
00039 {
00040         $info = get_module_info('copyright');
00041         if (!$info['enabled'])
00042                 return;
00043 ?>
00044 <p class="copyright_text">
00045 <?php echo get_entry('config', 'copyright_base'); ?>
00046 </p>
00047 <?php
00048 }
00049 //}}}
00050 ?>

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