[geeklog-cvs] Geeklog-1.x/public_html/admin/plugins/staticpages install.php, 1.28, 1.29
Dirk Haun
dhaun at qs1489.pair.com
Sat Jan 26 15:05:47 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/staticpages
In directory qs1489.pair.com:/tmp/cvs-serv93037/staticpages
Modified Files:
install.php
Log Message:
Update Static Pages config settings
Index: install.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/staticpages/install.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** install.php 4 Jan 2008 03:21:12 -0000 1.28
--- install.php 26 Jan 2008 20:05:44 -0000 1.29
***************
*** 13,17 ****
// | Upgraded for GL version 1.5 online config manager |
// | |
! // | Copyright (C) 2002-2006 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
--- 13,17 ----
// | Upgraded for GL version 1.5 online config manager |
// | |
! // | Copyright (C) 2002-2008 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
***************
*** 40,44 ****
// $Id$
! require_once ('../../../lib-common.php');
// Plugin information
--- 40,44 ----
// $Id$
! require_once '../../../lib-common.php';
// Plugin information
***************
*** 48,53 ****
$pi_display_name = 'Static Page';
$pi_name = 'staticpages';
! $pi_version = '1.5';
! $gl_version = '1.4.1';
$pi_url = 'http://www.geeklog.net/';
--- 48,53 ----
$pi_display_name = 'Static Page';
$pi_name = 'staticpages';
! $pi_version = '1.5.0';
! $gl_version = '1.5.0';
$pi_url = 'http://www.geeklog.net/';
***************
*** 55,59 ****
// Load the configuration defaults
! require_once ("{$base_path}install_defaults.php");
// name of the Admin group
--- 55,59 ----
// Load the configuration defaults
! require_once $base_path . 'install_defaults.php';
// name of the Admin group
***************
*** 97,101 ****
-
/**
* Loads the configuration records for the GL Online Config Manager
--- 97,100 ----
***************
*** 104,129 ****
*
*/
! function plugin_load_configuration ()
{
! global $_CONF,$pi_version,$_SP_DEFAULT;
require_once $_CONF['path_system'] . 'classes/config.class.php';
$sp_config = config::get_instance();
$sp_config->initConfig();
! if(! $sp_config->group_exists('staticpages')){
! $sp_config->add('version', $pi_version, 'text', 0, 0, null, 0, true, 'staticpages');
! $sp_config->add('allow_php', $_SP_DEFAULT['allow_php'], 'text', 0, 0, null, 10, true, 'staticpages');
! $sp_config->add('sort_by', $_SP_DEFAULT['sort_by'], 'text', 0, 0, null, 20, true, 'staticpages');
! $sp_config->add('sort_menu_by', $_SP_DEFAULT['sort_menu_by'], 'text', 0, 0, null, 30, true, 'staticpages');
! $sp_config->add('delete_pages', $_SP_DEFAULT['delete_pages'] , 'text', 0, 0, null, 40, true, 'staticpages');
! $sp_config->add('in_block', $_SP_DEFAULT['in_block'], 'text', 0, 0, null, 50, true, 'staticpages');
! $sp_config->add('show_hits', $_SP_DEFAULT['show_hits'], 'text', 0, 0, null, 60, true, 'staticpages');
! $sp_config->add('show_date', $_SP_DEFAULT['show_date'], 'text', 0, 0, null, 70, true, 'staticpages');
! $sp_config->add('filter_html', $_SP_DEFAULT['filter_html'], 'text', 0, 0, null, 80, true, 'staticpages');
! $sp_config->add('censor', $_SP_DEFAULT['censor'], 'text', 0, 0, null, 90, true, 'staticpages');
! $sp_config->add('default_permissions', $_SP_DEFAULT['default_permissions'], '@text', 0, 0, null, 100, true, 'staticpages');
! $sp_config->add('aftersave', $_SP_DEFAULT['aftersave'], 'text', 0, 0, null, 110, true, 'staticpages');
! $sp_config->add('atom_max_items', $_SP_DEFAULT['atom_max_items'], 'text', 0, 0, null, 120, true, 'staticpages');
}
return true;
}
--- 103,129 ----
*
*/
! function plugin_load_configuration()
{
! global $_CONF, $pi_name, $_SP_DEFAULT;
require_once $_CONF['path_system'] . 'classes/config.class.php';
+
$sp_config = config::get_instance();
$sp_config->initConfig();
! if (! $sp_config->group_exists($pi_name)) {
! $sp_config->add('allow_php', $_SP_DEFAULT['allow_php'], 'select', 0, 0, 0, 10, true, 'staticpages');
! $sp_config->add('sort_by', $_SP_DEFAULT['sort_by'], 'select', 0, 0, 2, 20, true, 'staticpages');
! $sp_config->add('sort_menu_by', $_SP_DEFAULT['sort_menu_by'], 'select', 0, 0, 3, 30, true, 'staticpages');
! $sp_config->add('delete_pages', $_SP_DEFAULT['delete_pages'], 'select', 0, 0, 0, 40, true, 'staticpages');
! $sp_config->add('in_block', $_SP_DEFAULT['in_block'], 'select', 0, 0, 0, 50, true, 'staticpages');
! $sp_config->add('show_hits', $_SP_DEFAULT['show_hits'], 'select', 0, 0, 0, 60, true, 'staticpages');
! $sp_config->add('show_date', $_SP_DEFAULT['show_date'], 'select', 0, 0, 0, 70, true, 'staticpages');
! $sp_config->add('filter_html', $_SP_DEFAULT['filter_html'], 'select', 0, 0, 0, 80, true, 'staticpages');
! $sp_config->add('censor', $_SP_DEFAULT['censor'], 'select', 0, 0, 0, 90, true, 'staticpages');
! $sp_config->add('aftersave', $_SP_DEFAULT['aftersave'], 'select', 0, 0, 9, 100, true, 'staticpages');
! $sp_config->add('atom_max_items', $_SP_DEFAULT['atom_max_items'], 'text', 0, 0, null, 110, true, 'staticpages');
! $sp_config->add('default_permissions', $_SP_DEFAULT['default_permissions'], '@select', 0, 1, 12, 120, true, 'staticpages');
}
+
return true;
}
***************
*** 272,275 ****
--- 272,283 ----
}
+ // Load the online configuration records
+ if (function_exists('plugin_load_configuration')) {
+ if (!plugin_load_configuration()) {
+ PLG_uninstall($pi_name);
+ return false;
+ }
+ }
+
// Finally, register the plugin with Geeklog
COM_errorLog ("Registering $pi_display_name plugin with Geeklog", 1);
***************
*** 284,295 ****
PLG_uninstall ($pi_name);
return false;
- }
-
- // Load the online configuration records
- if (function_exists ('plugin_load_configuration')) {
- if (!plugin_load_configuration ()) {
- PLG_uninstall ($pi_name);
- return false;
- }
}
--- 292,295 ----
More information about the geeklog-cvs
mailing list