phpmp-commits Mailing List for phpMyPublications (Page 21)
Status: Pre-Alpha
Brought to you by:
heimidal
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(69) |
May
(1) |
Jun
|
Jul
(53) |
Aug
(27) |
Sep
|
Oct
|
Nov
(35) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(65) |
Mar
|
Apr
(15) |
May
(40) |
Jun
(72) |
Jul
|
Aug
(2) |
Sep
(95) |
Oct
(37) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brian R. <hei...@us...> - 2002-07-25 11:06:28
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP/css In directory usw-pr-cvs1:/tmp/cvs-serv25048/templates/TealMP/css Modified Files: tpl_style.css Log Message: Integrated Smarty Template Engine into phpMP. Removed old template engine and files no longer needed (but may be added back later). Note: Blocking does not yet work. Still a few kinks. Index: tpl_style.css =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/css/tpl_style.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** tpl_style.css 9 Apr 2002 03:58:37 -0000 1.1 --- tpl_style.css 25 Jul 2002 11:06:26 -0000 1.2 *************** *** 4,8 **** } .header { ! background-color: #E2E2E2 } .tableborder { --- 4,8 ---- } .header { ! background-color: #E2E2E2; } .tableborder { *************** *** 38,40 **** --- 38,45 ---- font-size : 10px; text-decoration: none; + background-color: #0f9ebc; + } + + .copyright { + background-color: #0f9ebc; } |
From: Brian R. <hei...@us...> - 2002-07-25 11:06:28
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv25048/templates/TealMP Modified Files: box.tpl Added Files: block.tpl index.tpl Removed Files: blocking.cfg footer.tpl header.tpl Log Message: Integrated Smarty Template Engine into phpMP. Removed old template engine and files no longer needed (but may be added back later). Note: Blocking does not yet work. Still a few kinks. --- NEW FILE: block.tpl --- <table width="150" cellspacing="0" cellpadding="0"> <tr> <td height="20" class="tabletitle"> <table width="100%" class="tabletitle" bordercolor=black background="{$mpuri}/templates/{$tpl_name}/images/navbg.gif"><tr><td width="100%" class="tabletitle" bordercolor=black> <font color=white><small>{$name_bl}</small></font> </td></tr></table> </td> </tr> <tr> <td> <table width="100%" class="tableborder" bordercolor=black><tr><td> {$content_bl} </td></tr></table> </td> </tr> </table> --- NEW FILE: index.tpl --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>.:: {$site_name} :: Home ::.</title> <script src="{$mpuri}/templates/{$tpl_name}/js/fade.js" language="Javascript"></script> <link rel="stylesheet" href="{$mpuri}/templates/{$tpl_name}/css/tpl_style.css" type="text/css" /> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table class="header" width="100%" bgcolor="#0f9fbc" cellpadding="0" cellspacing="0"> <tr> <td width="300" align="left"><img src="{$mpuri}/templates/{$tpl_name}/images/logo.jpg" /></td> <td width="100%" align="center" background="{$mpuri}/templates/{$tpl_name}/images/topbg.jpg"><img src="{$mpuri}/templates/{$tpl_name}/images/pixel.gif" /></td> <td width="25" align="right" background="{$mpuri}/templates/{$tpl_name}/images/grad_ld_lr.gif"><img src="{$mpuri}/templates/{$tpl_name}/images/grad_ld_lr.gif" /></td> </tr> <tr> <td width="100%" bgcolor=black colspan="5"><img src="{$mpuri}/templates/{$tpl_name}/images/pixel.gif" /></td> </tr> <tr> <td width="100%" colspan="5" align="center" bgcolor="#C0C0C0"><font size="2"> <a href="{$mpuri}/index.php">home</a> {$bullet_html} <a href="/features.php">features</a> {$bullet_html} <a href="/forums/index.php">forums</a> {$bullet_html} <a href="/downloads.php">downloads</a> {$bullet_html} <a href="/support.php">support</a> {$bullet_html} <a href="/about.php">about</a> {$bullet_html} <a href="http://phpmp.sourceforge.net/team.php">team</a> {$bullet_html} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {$bullet_html} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {$bullet_html} <a href="http://www.sourceforge.net/">sourceforge</a> </font> </td> </tr> <tr> <td width="100%" bgcolor=black colspan="5"><img src="{$mpuri}/templates/{$tpl_name}/images/pixel.gif" /></td> </tr> </table> <table width="100%" bgcolor="#9fc2c6" cellspacing="0" cellpadding="2"> <tr> {* include file=box.tpl *} <td valign="top"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td height="20" class="tabletitle"> <table width="100%" class="tabletitle" bordercolor=black background="{$mpuri}/templates/{$tpl_name}/images/navbg.gif"> <tr> <td width="100%" class="tabletitle" bordercolor=black> <font color=white><small>.:: {$site_name} :: Home ::.</small></font> </td> </tr> </table> </td> </tr> <tr> <td> <table width="100%" class="tableborder" bordercolor=black> <tr> <td> Welcome to the home of the phpMP project. This site is constantly being updated with new functions, but for now is entirely incomplete. If you encounter any error whatsoever, please <b>don't</b> let us know. Until the release of phpMP 1.0, you can definitely expect to see errors on this web site.<br /><br /> Feel free to look around, however. Our <a href="/forums/index.php">forums</a> are available for anyone wishing to contribute or find out more about the phpMP project.<br /><br /> </td> </tr> </table> </td> </tr> </table> </td> {* include file=box.tpl *} </tr> <tr> <td colspan="3"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td> <table class="header" width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="100%" bgcolor=black colspan="2"><img src="{$mpuri}/templates/{$tpl_name}/images/pixel.gif" /></td> </tr> <tr> <td width="100%" colspan="2" align="center" bgcolor="#C0C0C0"> <font size="2"> <a href="{$mpuri}/index.php">home</a> {$bullet_html} <a href="/features.php">features</a> {$bullet_html} <a href="/forums/index.php">forums</a> {$bullet_html} <a href="/downloads.php">downloads</a> {$bullet_html} <a href="/support.php">support</a> {$bullet_html} <a href="/about.php">about</a> {$bullet_html} <a href="http://phpmp.sourceforge.net/team.php">team</a> {$bullet_html} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {$bullet_html} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {$bullet_html} <a href="http://www.sourceforge.net/">sourceforge</a> </font> </td> </tr> <tr> <td width="100%" bgcolor=black colspan="2"><img src="{$mpuri}/templates/{$tpl_name}/images/pixel.gif" /></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="25" width="100%" background="{$mpuri}/templates/{$tpl_name}/images/footer_bottom.gif" bgcolor="#000000"></td> </tr> <tr> <td height="1" bgcolor="#000000"></td> </tr> <tr> <table border="0" cellspacing="0" width="100%" cellpadding="0" class="copyright"> <tr> <td width="100" align="left" background="{$mpuri}/templates/{$tpl_name}/images/footer_left.gif"></td> <td width="*" align="center"><font size="-2">{$copyright}<br>{$debug_info}</font></td> <td width="100" align="right" background="{$mpuri}/templates/{$tpl_name}/images/footer_right.gif"></td> </tr> </table> </tr> <tr> <td height="1" bgcolor="#000000"></td> </tr> <tr> <td height="25" width="100%" background="{$mpuri}/templates/{$tpl_name}/images/footer_top.gif" bgcolor="#000000"></td> </tr> <tr> <td width="100%" height="*" valign="bottom" align="right" class="copyright"><a href="http://www.trevorj.com" class="tjcopyright">:: design by trevorj ::</a> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html> Index: box.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/box.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** box.tpl 9 Apr 2002 03:59:01 -0000 1.1 --- box.tpl 25 Jul 2002 11:06:26 -0000 1.2 *************** *** 2,7 **** <tr> <td height="20" class="tabletitle"> ! <table width="100%" class="tabletitle" bordercolor=black background="{MPURLPATH}/templates/{TPLNAME}/images/navbg.gif"><tr><td width="100%" class="tabletitle" bordercolor=black> ! <font color=white><small>{TITLE}</small></font> </td></tr></table> </td> --- 2,7 ---- <tr> <td height="20" class="tabletitle"> ! <table width="100%" class="tabletitle" bordercolor=black background="{mpuri}/templates/{tpl_name}/images/navbg.gif"><tr><td width="100%" class="tabletitle" bordercolor=black> ! <font color=white><small>{$title}</small></font> </td></tr></table> </td> *************** *** 10,14 **** <td> <table width="100%" class="tableborder" bordercolor=black><tr><td> ! {CONTENT} </td></tr></table> </td> --- 10,14 ---- <td> <table width="100%" class="tableborder" bordercolor=black><tr><td> ! {$content} </td></tr></table> </td> --- blocking.cfg DELETED --- --- footer.tpl DELETED --- --- header.tpl DELETED --- |
From: Brian R. <hei...@us...> - 2002-07-25 11:06:28
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv25048/includes Modified Files: core.php Added Files: Config_File.class.php Smarty.class.php Smarty_Compiler.class.php template_ext.php Removed Files: template.php Log Message: Integrated Smarty Template Engine into phpMP. Removed old template engine and files no longer needed (but may be added back later). Note: Blocking does not yet work. Still a few kinks. --- NEW FILE: Config_File.class.php --- <?php /** * Config_File class. * * @version 2.2.0 * @author Andrei Zmievski <an...@ph...> * @access public * * Copyright: 2001,2002 ispi of Lincoln, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You may contact the author of Config_File by e-mail at: * an...@ph... * * Or, write to: * Andrei Zmievski * Software Engineer, ispi * 237 S. 70th suite 220 * Lincoln, NE 68510 * * The latest version of Config_File can be obtained from: * http://www.phpinsider.com */ class Config_File { /* Options */ /** * Controls whether variables with the same name overwrite each other. * * @access public */ var $overwrite = true; /** * Controls whether config values of on/true/yes and off/false/no get * converted to boolean values automatically. * * @access public */ var $booleanize = true; /** * Controls whether hidden config sections/vars are read from the file. * * @access public */ var $read_hidden = true; /* Private variables */ var $_config_path = ""; var $_config_data = array(); var $_separator = ""; /** * Constructs a new config file class. * * @param $config_path string (optional) path to the config files * @access public */ function Config_File($config_path = NULL) { if (substr(PHP_OS, 0, 3) == "WIN" || substr(PHP_OS, 0, 4) == "OS/2") $this->_separator = "\\"; else $this->_separator = "/"; if (isset($config_path)) $this->set_path($config_path); } /** * Set the path where configuration files can be found. * * @param $config_path string path to the config files * @access public */ function set_path($config_path) { if (!empty($config_path)) { if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) { $this->_trigger_error_msg("Bad config file path '$config_path'"); return; } $this->_config_path = $config_path . $this->_separator; } } /** * Retrieves config info based on the file, section, and variable name. * * @access public * @param $file_name string config file to get info for * @param $section_name string (optional) section to get info for * @param $var_name string (optional) variable to get info for * @return mixed a value or array of values */ function &get($file_name, $section_name = NULL, $var_name = NULL) { if (empty($file_name)) { $this->_trigger_error_msg('Empty config file name'); return; } else { $file_name = $this->_config_path . $file_name; if (!isset($this->_config_data[$file_name])) $this->load_file($file_name, false); } if (!empty($var_name)) { if (empty($section_name)) { return $this->_config_data[$file_name]["vars"][$var_name]; } else return $this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name]; } else { if (empty($section_name)) return (array)$this->_config_data[$file_name]["vars"]; else return (array)$this->_config_data[$file_name]["sections"][$section_name]["vars"]; } } /** * Retrieves config info based on the key. * * @access public * @param $file_name string config key (filename/section/var) * @return mixed a value or array of values */ function &get_key($config_key) { list($file_name, $section_name, $var_name) = explode('/', $config_key, 3); $result = &$this->get($file_name, $section_name, $var_name); return $result; } /** * Get all loaded config file names. * * @access public * @return array an array of loaded config file names */ function get_file_names() { return array_keys($this->_config_data); } /** * Get all section names from a loaded file. * * @access public * @param $file_name string config file to get section names from * @return array an array of section names from the specified file */ function get_section_names($file_name) { $file_name = $this->_config_path . $file_name; if (!isset($this->_config_data[$file_name])) { $this->_trigger_error_msg("Unknown config file '$file_name'"); return; } return array_keys($this->_config_data[$file_name]["sections"]); } /** * Get all global or section variable names. * * @access public * @param $file_name string config file to get info for * @param $section_name string (optional) section to get info for * @return array an array of variables names from the specified file/section */ function get_var_names($file_name, $section = NULL) { if (empty($file_name)) { $this->_trigger_error_msg('Empty config file name'); return; } else if (!isset($this->_config_data[$file_name])) { $this->_trigger_error_msg("Unknown config file '$file_name'"); return; } if (empty($section)) return array_keys($this->_config_data[$file_name]["vars"]); else return array_keys($this->_config_data[$file_name]["sections"][$section]["vars"]); } /** * Clear loaded config data for a certain file or all files. * * @access public * @param $file_name string file to clear config data for */ function clear($file_name = NULL) { if ($file_name === NULL) $this->_config_data = array(); else if (isset($this->_config_data[$file_name])) $this->_config_data[$file_name] = array(); } /** * Load a configuration file manually. * * @access public * @param $file_name string file name to load * @param $prepend_path boolean whether current config path should be prepended to the filename */ function load_file($file_name, $prepend_path = true) { if ($prepend_path && $this->_config_path != "") $config_file = $this->_config_path . $file_name; else $config_file = $file_name; ini_set('track_errors', true); $fp = @fopen($config_file, "r"); if (!is_resource($fp)) { $this->_trigger_error_msg("Could not open config file '$config_file'"); return; } $contents = fread($fp, filesize($config_file)); fclose($fp); $config_data = array(); /* Get global variables first. */ if (preg_match("/^(.*?)(\n\[|\Z)/s", $contents, $match)) $config_data["vars"] = $this->_parse_config_block($match[1]); /* Get section variables. */ $config_data["sections"] = array(); preg_match_all("/^\[(.*?)\]/m", $contents, $match); foreach ($match[1] as $section) { if ($section{0} == '.' && !$this->read_hidden) continue; if (preg_match("/\[".preg_quote($section)."\](.*?)(\n\[|\Z)/s", $contents, $match)) if ($section{0} == '.') $section = substr($section, 1); $config_data["sections"][$section]["vars"] = $this->_parse_config_block($match[1]); } $this->_config_data[$config_file] = $config_data; } function _parse_config_block($config_block) { $vars = array(); /* First we grab the multi-line values. */ if (preg_match_all("/^([^=\n]+)=\s*\"{3}(.*?)\"{3}\s*$/ms", $config_block, $match, PREG_SET_ORDER)) { for ($i = 0; $i < count($match); $i++) { $this->_set_config_var($vars, trim($match[$i][1]), $match[$i][2], false); } $config_block = preg_replace("/^[^=\n]+=\s*\"{3}.*?\"{3}\s*$/ms", "", $config_block); } $config_lines = preg_split("/\n+/", $config_block); foreach ($config_lines as $line) { if (preg_match("/^\s*(\.?\w+)\s*=(.*)/", $line, $match)) { $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', trim($match[2])); $this->_set_config_var($vars, trim($match[1]), $var_value, $this->booleanize); } } return $vars; } function _set_config_var(&$container, $var_name, $var_value, $booleanize) { if ($var_name{0} == '.') { if (!$this->read_hidden) return; else $var_name = substr($var_name, 1); } if (!preg_match("/^[a-zA-Z_]\w*$/", $var_name)) { $this->_trigger_error_msg("Bad variable name '$var_name'"); return; } if ($booleanize) { if (preg_match("/^(on|true|yes)$/i", $var_value)) $var_value = true; else if (preg_match("/^(off|false|no)$/i", $var_value)) $var_value = false; } if (!isset($container[$var_name]) || $this->overwrite) $container[$var_name] = $var_value; else { settype($container[$var_name], 'array'); $container[$var_name][] = $var_value; } } function _trigger_error_msg($error_msg, $error_type = E_USER_WARNING) { trigger_error("Config_File error: $error_msg", $error_type); } } ?> --- NEW FILE: Smarty.class.php --- <?php /* * Project: Smarty: the PHP compiling template engine * File: Smarty.class.php * Author: Monte Ohrt <mo...@is...> * Andrei Zmievski <an...@ph...> * * Version: 2.2.0 * Copyright: 2001,2002 ispi of Lincoln, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. [...1933 lines suppressed...] // windows pathnames $_path_array = explode(';',$_ini_include_path); } else { $_path_array = explode(':',$_ini_include_path); } } foreach ($_path_array as $_include_path) { if (@file_exists($_include_path . DIR_SEP . $file_path)) { $new_file_path = $_include_path . DIR_SEP . $file_path; return true; } } return false; } } /* vim: set expandtab: */ ?> --- NEW FILE: Smarty_Compiler.class.php --- <?php /* * Project: Smarty: the PHP compiling template engine * File: Smarty_Compiler.class.php * Author: Monte Ohrt <mo...@is...> * Andrei Zmievski <an...@ph...> * * Version: 2.2.0 * Copyright: 2001,2002 ispi of Lincoln, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU [...1354 lines suppressed...] } } } } /*======================================================================*\ Function: _syntax_error Purpose: display Smarty syntax error \*======================================================================*/ function _syntax_error($error_msg, $error_type = E_USER_ERROR) { trigger_error("Smarty: [in " . $this->_current_file . " line " . $this->_current_line_no . "]: syntax error: $error_msg", $error_type); } } /* vim: set et: */ ?> --- NEW FILE: template_ext.php --- <? /****************************************************************************** ******************************************************************************* phpMP - The World's Greatest Modular Portal *********************************************** Are you MPowered? Copyright (C) 2002 phpMP Development Group All rights reserved. Lead Programmer: Brian Rose Lead Designer: Trevor Joynson Filename: /includes/template_ext.php Usage & Function: Contains Template-Smarty Class Create Date: July 25, 2002 $Id: template_ext.php,v 1.1 2002/07/25 11:06:25 heimidal Exp $ ******************************************************************************* ******************************************************************************* This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the regulations stated in the license. ******************************************************************************* ******************************************************************************* Notes on this document: Database abstraction classes have been partially taken from jimmacr's phpusion project. Some source code has been modified, but most functions do exactly the same thing he intended them for. Most likely, this code will be mostly rewritten by project release. ******************************************************************************* ******************************************************************************/ class Template extends Smarty { var $TPLVars; function Template() { // Class Constructor. These automatically get set with each new instance. global $MPCONF; $this->template_dir = $MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name']; $this->compile_dir = $MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/compile'; $this->config_dir = $MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/configs'; $this->cache_dir = ''; $this->force_compile = 1; $this->caching = false; //Hopefully we'll get caching working eventually. } function add_blocks($side) { global $MPCONF, $DBA; $sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "blocking WHERE side='" . $side . "' ORDER BY weight"; $data = $DBA->query($sql); $i = 0; while($data_array = $DBA->fetch_array($data)) { $blockname = ""; $content = ""; $blockname = $data_array['blockname']; if($data_array['is_php'] == '1') { include($MPCONF['GEN']['abs_path'] . '/modules/' . $data_array['php_file']); } else { $content = $data_array['content']; } $this->TPLVars["$side"][$i]['name'] = $blockname; $this->TPLVars["$side"][$i]['content'] = $content; $i++; } } function assign_defaults() { global $MPCONF, $DBA; $this->assign( array( "abspath" => $MPCONF['GEN']['abs_path'], "mpuri" => $MPCONF['GEN']['uri'], "site_address" => $MPCONF['GEN']['address'], "date" => date('l, F jS, Y'), "tpl_name" => $MPCONF['TPL']['tpl_name'], "copyright" => $MPCONF['TPL']['copyright'], "site_name" => $MPCONF['TPL']['sitename'], "bullet_html" => $MPCONF['TPL']['bullet_html'], ) ); } function display_template($temp_name) { global $DBA, $Debug; $this->add_blocks('left'); $this->add_blocks('right'); $this->assign_defaults(); $Debug->endTimer(); $this->assign("debug_info","debug mode :: " . $DBA->stats['query_count'] . " queries executed :: executed in " . $Debug->totaltime . " seconds"); $this->assign( "blocking", $this->TPLVars ); $this->display($temp_name . ".tpl"); } } ?> Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** core.php 25 Jul 2002 06:16:22 -0000 1.14 --- core.php 25 Jul 2002 11:06:25 -0000 1.15 *************** *** 40,44 **** ******************************************************************************/ ! class Debug { var $starttime; --- 40,44 ---- ******************************************************************************/ ! class Debug { //Taken from InvisionBoard and modified lightly. Will replace eventually. var $starttime; *************** *** 73,77 **** global $MPCONF; ! if($core_files!="") { $core_array = explode(',', "$core_files"); // Splits core_files. } --- 73,77 ---- global $MPCONF; ! if($core_files != "") { $core_array = explode(',', "$core_files"); // Splits core_files. } *************** *** 80,84 **** $core_array[] = 'functions'; $core_array[] = 'auth'; ! $core_array[] = 'template'; for($i=0; $i < count($core_array); $i++) { --- 80,85 ---- $core_array[] = 'functions'; $core_array[] = 'auth'; ! $core_array[] = 'Smarty.class'; ! $core_array[] = 'template_ext'; for($i=0; $i < count($core_array); $i++) { *************** *** 98,102 **** $Template = new Template(); ! if($var_files!="") { $var_array = explode(',', "$var_files"); // Splits var_files. } --- 99,103 ---- $Template = new Template(); ! if($var_files != "") { $var_array = explode(',', "$var_files"); // Splits var_files. } --- template.php DELETED --- |
From: Brian R. <hei...@us...> - 2002-07-25 11:06:28
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv25048 Modified Files: index.php Log Message: Integrated Smarty Template Engine into phpMP. Removed old template engine and files no longer needed (but may be added back later). Note: Blocking does not yet work. Still a few kinks. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** index.php 21 Jul 2002 21:43:33 -0000 1.16 --- index.php 25 Jul 2002 11:06:25 -0000 1.17 *************** *** 48,73 **** $PHPMP->Init(); ! // Start The Page ! $Template->PrintHeader( array(PAGETITLE => "Home") ); ! ! // Display The Left Side ! $Template->CreateSide('left'); ! ! // Start The Main Section ! $Template->Blocking('BeginMain'); ! ! $Template->Blocking('BeginBig', array(PAGETITLE => "Home")); ! ! print "Welcome, one and all!!!!!<br>\n"; ! ! $Template->Blocking('EndBig'); ! ! // End The Main Section ! $Template->Blocking('EndMain'); ! ! // Display The Right Side, If Wanted On Page ! $Template->CreateSide('right'); ! ! $Template->PrintFooter( array() ); ?> --- 48,52 ---- $PHPMP->Init(); ! $Template->display_template('index'); ?> |
From: Brian R. <hei...@us...> - 2002-07-25 10:56:44
|
Update of /cvsroot/phpmp/phpMP/includes/plugins In directory usw-pr-cvs1:/tmp/cvs-serv23272/plugins Log Message: Directory /cvsroot/phpmp/phpMP/includes/plugins added to the repository |
From: Brian R. <hei...@us...> - 2002-07-25 06:16:26
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv16001/dba Modified Files: mysql.dba Log Message: Fixed a few bugs; changed a template or two. Expect HUGE update of teomplate engine on next go-around. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** mysql.dba 23 Apr 2002 08:14:54 -0000 1.13 --- mysql.dba 25 Jul 2002 06:16:22 -0000 1.14 *************** *** 1,3 **** ! <? /****************************************************************************** --- 1,3 ---- ! <?php /****************************************************************************** *************** *** 45,52 **** var $identLink; function connect() { global $MPCONF, $db; ! $db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password']); if (!$db) { $this->connected = 0; --- 45,55 ---- var $identLink; + var $stats; + var $connected; function connect() { global $MPCONF, $db; ! if (empty($this->identLink)) { ! $db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password']); if (!$db) { $this->connected = 0; *************** *** 54,61 **** --- 57,90 ---- } else { $this->identLink = $db; + $this->select_db($MPCONF['DB']['database']); return $db; } + } else { + return $this->identLink; + } + } + + function p_connect() { + global $MPCONF, $db; + if (empty($this->identLink)) { + $db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password']); + if (!$db) { + $this->connected = 0; + return 0; + } else { + $this->identLink = $db; + $this->select_db($MPCONF['DB']['database']); + return $db; + } + } else { + return $this->identLink; + } } + function p_close() { + @mysql_close($this->identLink); + $this->identLink = 0; + } + function close() { @mysql_close($this->identLink); *************** *** 63,68 **** } ! function query($query) { global $MPCONF; if($this->identLink == 0) { $db = $this->connect(); --- 92,98 ---- } ! function query($query,$null='') { global $MPCONF; + $this->stats['query_count']++; if($this->identLink == 0) { $db = $this->connect(); *************** *** 76,85 **** else { // Execute query ! @mysql_select_db($MPCONF['DB']['database'], $db); ! $result = @mysql_query($query, $db) or die("MySQL Error: ".mysql_error($db)); } return $result; } function num_rows($query) { if($this->identLink == 0) { --- 106,133 ---- else { // Execute query ! $result = @mysql_query($query, $db) or die("MySQL Error: ".@mysql_error($db)); ! // $result = mysql_query($query, $db); } return $result; } + function select_db($db_name,$null='') { + global $MPCONF; + if($this->identLink == 0) { + $db = $this->connect(); + } else { + $db = $this->identLink; + } + if (!$db) { + $result = 0; + die("db connect error"); + } + else { + // Execute query + $result = @mysql_select_db($db_name, $db) or die("MySQL Error: ".@mysql_error($db)); + } + return $result; + } + function num_rows($query) { if($this->identLink == 0) { *************** *** 90,93 **** --- 138,161 ---- $num = @mysql_num_rows($query); return $num; + } + + function insert_id() { + if($this->identLink == 0) { + $db = $this->connect(); + } else { + $db = $this->identLink; + } + $num = @mysql_insert_id($this->identLink); + return $num; + } + + function result($result, $row, $field='') { + if($this->identLink == 0) { + $db = $this->connect(); + } else { + $db = $this->identLink; + } + $result = @mysql_result($result, $row, $field); + return $result; } |
From: Brian R. <hei...@us...> - 2002-07-25 06:16:26
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv16001/includes Modified Files: constants.php core.php functions.php template.php Log Message: Fixed a few bugs; changed a template or two. Expect HUGE update of teomplate engine on next go-around. Index: constants.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/constants.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** constants.php 21 Jul 2002 21:43:33 -0000 1.4 --- constants.php 25 Jul 2002 06:16:22 -0000 1.5 *************** *** 1,5 **** <? ! $MPCONF['TPL']['copyright'] .= "powered by phpMP " . $MPCONF['GEN']['version'] . " © 2002 <a href=\"http://phpmp.sourceforge.net/\">phpMP Dev. Group</a>.<br>\n"; $MPCONF['TPL']['copyright'] .= "All content is property of its respective owner. All rights reserved."; --- 1,5 ---- <? ! $MPCONF['TPL']['copyright'] .= "powered by phpMP " . $MPCONF['GEN']['version'] . " © 2002 <a href=\"http://phpmp.sourceforge.net/\">phpMP Dev. Group</a>.<br>\n"; $MPCONF['TPL']['copyright'] .= "All content is property of its respective owner. All rights reserved."; Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** core.php 23 Apr 2002 08:14:55 -0000 1.13 --- core.php 25 Jul 2002 06:16:22 -0000 1.14 *************** *** 40,43 **** --- 40,67 ---- ******************************************************************************/ + class Debug { + + var $starttime; + var $totaltime; + + function startTimer() { + $mtime = microtime (); + $mtime = explode (' ', $mtime); + $mtime = $mtime[1] + $mtime[0]; + $this->starttime = $mtime; + } + function endTimer() { + $mtime = microtime (); + $mtime = explode (' ', $mtime); + $mtime = $mtime[1] + $mtime[0]; + $endtime = $mtime; + $totaltime = round (($endtime - $this->starttime), 5); + $this->totaltime = $totaltime; + } + } + + $Debug = new Debug(); + $Debug->startTimer(); + // Main phpMP Class which loads all other files, config options, and modules. class PHPMP{ Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** functions.php 23 Apr 2002 08:14:55 -0000 1.9 --- functions.php 25 Jul 2002 06:16:22 -0000 1.10 *************** *** 47,49 **** --- 47,75 ---- } + class ModFunctions { + + // Changes the data string in the database for the module specified. + // Returns: 1 on success, 0 on failure. + function ChangeDataString($mod, $string) { + global $DBA; + $sql = "UPDATE " . $MPCONF['DB']['table_prefix'] . "modules SET data='" . $string . "'WHERE unixname='" . $mod; + if($DBA->query($sql)) { + return 1; + } else { + return 0; + } + } + + // Fetches the data stored by a module. + // Returns: data string. + function FetchDataString($mod, $string) { + global $DBA; + $sql = "SELECT data FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $mod; + $db = $DBA->query($sql); + $result = $DBA->fetch_array($db); + return $result[0]; + } + + } + ?> Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** template.php 22 Jul 2002 00:49:43 -0000 1.16 --- template.php 25 Jul 2002 06:16:22 -0000 1.17 *************** *** 67,71 **** // Returns: $array with some extra, assigned values. function AssignDefaults($array) { ! global $MPCONF; $array['MPPATH'] = $MPCONF['GEN']['abs_path']; --- 67,71 ---- // Returns: $array with some extra, assigned values. function AssignDefaults($array) { ! global $MPCONF, $DBA; $array['MPPATH'] = $MPCONF['GEN']['abs_path']; *************** *** 77,80 **** --- 77,81 ---- $array['SITENAME'] = $MPCONF['TPL']['sitename']; $array['BULLETHTML'] = $MPCONF['TPL']['bullet_html']; + $array['DEVINFO'] = "debug mode :: " . $DBA->stats['query_count'] . " queries executed"; return $array; *************** *** 102,109 **** // Returns: none. function PrintFooter($tpl_array) { ! global $MPCONF; $tpl_array = $this->AssignDefaults($tpl_array); $footer_data = implode("", (@file($MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/footer.tpl'))); while (list ($key,$val) = each ($tpl_array) ) { if (!(empty($key))) { --- 103,114 ---- // Returns: none. function PrintFooter($tpl_array) { ! global $MPCONF, $Debug; $tpl_array = $this->AssignDefaults($tpl_array); $footer_data = implode("", (@file($MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/footer.tpl'))); + + $Debug->endTimer(); + $tpl_array['DEVINFO'] .= " :: executed in " . $Debug->totaltime . " seconds"; + while (list ($key,$val) = each ($tpl_array) ) { if (!(empty($key))) { |
From: Brian R. <hei...@us...> - 2002-07-25 06:16:26
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv16001 Modified Files: modules.php Log Message: Fixed a few bugs; changed a template or two. Expect HUGE update of teomplate engine on next go-around. Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** modules.php 21 Jul 2002 22:40:44 -0000 1.7 --- modules.php 25 Jul 2002 06:16:22 -0000 1.8 *************** *** 87,90 **** --- 87,92 ---- $my_page_title = "Module Error"; + $ModFunctions = new ModFunctions(); + if($ModCheck != 0) { include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); |
From: Brian R. <hei...@us...> - 2002-07-25 06:16:25
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv16001/templates/TealMP Modified Files: footer.tpl header.tpl Log Message: Fixed a few bugs; changed a template or two. Expect HUGE update of teomplate engine on next go-around. Index: footer.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/footer.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** footer.tpl 22 Jul 2002 00:49:43 -0000 1.2 --- footer.tpl 25 Jul 2002 06:16:22 -0000 1.3 *************** *** 7,11 **** <tr> <td width="100%" colspan="2" align="center" bgcolor="#C0C0C0"><font size="2"> ! <a href="/index.php">home</a> {BULLETHTML} <a href="/features.php">features</a> {BULLETHTML} <a href="/downloads.php">files</a> {BULLETHTML} <a href="/support.php">support</a> {BULLETHTML} <a href="/about.php">about</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/team.php">team</a> {BULLETHTML} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {BULLETHTML} <a href="http://www.sourceforge.net/">sourceforge</a> </font></td> </tr> --- 7,11 ---- <tr> <td width="100%" colspan="2" align="center" bgcolor="#C0C0C0"><font size="2"> ! <a href="/index.php">home</a> {BULLETHTML} <a href="/features.php">features</a> {BULLETHTML} <a href="/forums/index.php">forums</a> {BULLETHTML} <a href="/downloads.php">downloads</a> {BULLETHTML} <a href="/support.php">support</a> {BULLETHTML} <a href="/about.php">about</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/team.php">team</a> {BULLETHTML} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {BULLETHTML} <a href="http://www.sourceforge.net/">sourceforge</a> </font></td> </tr> *************** *** 26,30 **** <table border="0" cellspacing="0" width="100%" cellpadding="0"><tr> <td width="100" align="left" background="{MPURLPATH}/templates/{TPLNAME}/images/footer_left.gif"></td> ! <td width="*" align="center"><font size="-2">{COPYRIGHT}</font></td> <td width="100" align="right" background="{MPURLPATH}/templates/{TPLNAME}/images/footer_right.gif"></td> </tr></table></tr> --- 26,30 ---- <table border="0" cellspacing="0" width="100%" cellpadding="0"><tr> <td width="100" align="left" background="{MPURLPATH}/templates/{TPLNAME}/images/footer_left.gif"></td> ! <td width="*" align="center"><font size="-2">{COPYRIGHT}<br>{DEVINFO}</font></td> <td width="100" align="right" background="{MPURLPATH}/templates/{TPLNAME}/images/footer_right.gif"></td> </tr></table></tr> Index: header.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/header.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** header.tpl 22 Jul 2002 00:49:43 -0000 1.3 --- header.tpl 25 Jul 2002 06:16:22 -0000 1.4 *************** *** 19,23 **** <tr> <td width="100%" colspan="5" align="center" bgcolor="#C0C0C0"><font size="2"> ! <a href="/index.php">home</a> {BULLETHTML} <a href="/features.php">features</a> {BULLETHTML} <a href="/downloads.php">files</a> {BULLETHTML} <a href="/support.php">support</a> {BULLETHTML} <a href="/about.php">about</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/team.php">team</a> {BULLETHTML} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {BULLETHTML} <a href="http://www.sourceforge.net/">sourceforge</a> </font></td> </tr> --- 19,23 ---- <tr> <td width="100%" colspan="5" align="center" bgcolor="#C0C0C0"><font size="2"> ! <a href="/index.php">home</a> {BULLETHTML} <a href="/features.php">features</a> {BULLETHTML} <a href="/forums/index.php">forums</a> {BULLETHTML} <a href="/downloads.php">downloads</a> {BULLETHTML} <a href="/support.php">support</a> {BULLETHTML} <a href="/about.php">about</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/team.php">team</a> {BULLETHTML} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {BULLETHTML} <a href="http://www.sourceforge.net/">sourceforge</a> </font></td> </tr> |
From: Brian R. <hei...@us...> - 2002-07-22 00:49:47
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv31664/includes Modified Files: template.php Log Message: Hardcoded something else that should've been hardcoded in the first place. Added Bullet HTML info (a separator, basically) to Template vars. Not sure if I really need this. RM'ed the TPLvars.cfg file since it is no longer needed. Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** template.php 21 Jul 2002 21:43:33 -0000 1.15 --- template.php 22 Jul 2002 00:49:43 -0000 1.16 *************** *** 76,82 **** $array['COPYRIGHT'] = $MPCONF['TPL']['copyright']; $array['SITENAME'] = $MPCONF['TPL']['sitename']; ! $array['BULLET-HTML'] = $MPCONF['TPL']['bullet_html']; ! ! include($MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/tplvars.cfg'); return $array; --- 76,80 ---- $array['COPYRIGHT'] = $MPCONF['TPL']['copyright']; $array['SITENAME'] = $MPCONF['TPL']['sitename']; ! $array['BULLETHTML'] = $MPCONF['TPL']['bullet_html']; return $array; |
From: Brian R. <hei...@us...> - 2002-07-22 00:49:47
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv31664/templates/TealMP Modified Files: footer.tpl header.tpl Removed Files: tplvars.cfg Log Message: Hardcoded something else that should've been hardcoded in the first place. Added Bullet HTML info (a separator, basically) to Template vars. Not sure if I really need this. RM'ed the TPLvars.cfg file since it is no longer needed. Index: footer.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/footer.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** footer.tpl 9 Apr 2002 03:59:01 -0000 1.1 --- footer.tpl 22 Jul 2002 00:49:43 -0000 1.2 *************** *** 6,10 **** </tr> <tr> ! <td width="100%" colspan="2" align="center" bgcolor="#C0C0C0"><font size="2">{NAVBAR}</font></td> </tr> <tr> --- 6,12 ---- </tr> <tr> ! <td width="100%" colspan="2" align="center" bgcolor="#C0C0C0"><font size="2"> ! <a href="/index.php">home</a> {BULLETHTML} <a href="/features.php">features</a> {BULLETHTML} <a href="/downloads.php">files</a> {BULLETHTML} <a href="/support.php">support</a> {BULLETHTML} <a href="/about.php">about</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/team.php">team</a> {BULLETHTML} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {BULLETHTML} <a href="http://www.sourceforge.net/">sourceforge</a> ! </font></td> </tr> <tr> Index: header.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/header.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** header.tpl 21 Jul 2002 21:43:33 -0000 1.2 --- header.tpl 22 Jul 2002 00:49:43 -0000 1.3 *************** *** 18,22 **** </tr> <tr> ! <td width="100%" colspan="5" align="center" bgcolor="#C0C0C0"><font size="2">{NAVBAR}</font></td> </tr> <tr> --- 18,24 ---- </tr> <tr> ! <td width="100%" colspan="5" align="center" bgcolor="#C0C0C0"><font size="2"> ! <a href="/index.php">home</a> {BULLETHTML} <a href="/features.php">features</a> {BULLETHTML} <a href="/downloads.php">files</a> {BULLETHTML} <a href="/support.php">support</a> {BULLETHTML} <a href="/about.php">about</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/team.php">team</a> {BULLETHTML} <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> {BULLETHTML} <a href="http://phpmp.sourceforge.net/devworld/modules/index.php?action=list">modules</a> {BULLETHTML} <a href="http://www.sourceforge.net/">sourceforge</a> ! </font></td> </tr> <tr> --- tplvars.cfg DELETED --- |
From: Brian R. <hei...@us...> - 2002-07-21 22:40:47
|
Update of /cvsroot/phpmp/phpMP/docs In directory usw-pr-cvs1:/tmp/cvs-serv4148/docs Modified Files: MODULES Log Message: Actually fixed the module double-include bug. It didn't happen but it wasn't fixed before. Hmm. Index: MODULES =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/MODULES,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** MODULES 21 Jul 2002 22:29:23 -0000 1.4 --- MODULES 21 Jul 2002 22:40:44 -0000 1.5 *************** *** 22,26 **** // (hopefully) unique developer id (just like tables and // other such things). In this case 'MP' is the ! // developer id. class Module { // Standard. ALWAYS included. --- 22,27 ---- // (hopefully) unique developer id (just like tables and // other such things). In this case 'MP' is the ! // developer id. Also, this var should be identical to ! // $MPCONF['MOD']['mod_id']. class Module { // Standard. ALWAYS included. *************** *** 55,59 **** Module Database, also known as the phpmp_modules table in the user's database. This contains the module's name, filename, Unix-qualified ! identifier, information on whether or not the module is actuve, and any data the module wishes to store in a single-string variable (which can be split, exploded, that sort of thing). --- 56,60 ---- Module Database, also known as the phpmp_modules table in the user's database. This contains the module's name, filename, Unix-qualified ! identifier, module ID, information on whether or not the module is actuve, and any data the module wishes to store in a single-string variable (which can be split, exploded, that sort of thing). |
From: Brian R. <hei...@us...> - 2002-07-21 22:40:46
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv4148 Modified Files: modules.php Log Message: Actually fixed the module double-include bug. It didn't happen but it wasn't fixed before. Hmm. Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** modules.php 23 Apr 2002 08:14:54 -0000 1.6 --- modules.php 21 Jul 2002 22:40:44 -0000 1.7 *************** *** 71,78 **** function DoCheck() { ! if(($this->_inactive == 1) || ($this->_exists != 1) || defined('PHPMP_MOD_' . $mod_id)) { return 0; } else { ! define('PHPMP_MOD_' . $mod_id, true); return 1; } --- 71,78 ---- function DoCheck() { ! if(($this->_inactive == 1) || ($this->_exists != 1) || defined('PHPMP_MOD_' . $MPCONF['MOD']['mod_id'])) { return 0; } else { ! define('PHPMP_MOD_' . $MPCONF['MOD']['mod_id'], true); return 1; } *************** *** 85,95 **** $ModCheck = $ModClass->DoCheck(); if($ModCheck != 0) { include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); $Module->Init(); } ! $Template->PrintHeader( array(PAGETITLE => ".::" . $Module->pagetitle . "::.") ); $Template->CreateSide('left'); --- 85,99 ---- $ModCheck = $ModClass->DoCheck(); + $my_page_title = "Module Error"; + if($ModCheck != 0) { include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); $Module->Init(); + + $my_page_title = $Module->pagetitle; } ! $Template->PrintHeader( array(PAGETITLE => $my_page_title) ); $Template->CreateSide('left'); |
From: Brian R. <hei...@us...> - 2002-07-21 22:29:27
|
Update of /cvsroot/phpmp/phpMP/docs In directory usw-pr-cvs1:/tmp/cvs-serv1644 Modified Files: MODULES Log Message: Might as well update this as I go along. Index: MODULES =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/MODULES,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MODULES 21 Jul 2002 21:43:33 -0000 1.3 --- MODULES 21 Jul 2002 22:29:23 -0000 1.4 *************** *** 18,22 **** <? ! $mod_id = 'SAMPLE'; // File this code is contained in. class Module { // Standard. ALWAYS included. --- 18,26 ---- <? ! $mod_id = 'MP_SAMPLE'; // Mod ID. ! // When creating unofficial mods, please prepend this with a ! // (hopefully) unique developer id (just like tables and ! // other such things). In this case 'MP' is the ! // developer id. class Module { // Standard. ALWAYS included. *************** *** 31,35 **** // If you need to call other functions after this one, call them at the end. global $Template; // Makes the $Template class global. ! $Template->Blocking('BeginBig', array(PAGETITLE => $this->pagetitle)); // Begins a 'big' middle block. print "This is a test...<br>This is only a test...<br>\n"; // Prints a line. --- 35,41 ---- // If you need to call other functions after this one, call them at the end. global $Template; // Makes the $Template class global. ! ! // Begins a 'big' middle block. ! $Template->Blocking('BeginBig', array(PAGETITLE => $this->pagetitle)); print "This is a test...<br>This is only a test...<br>\n"; // Prints a line. *************** *** 46,50 **** Note that all modules must reside in the modules/ directory within ! the phpMP root. Alrighty...so. I guess the template object should be explained a bit. --- 52,63 ---- Note that all modules must reside in the modules/ directory within ! the phpMP root. In addition, a module must register with the phpMP ! Module Database, also known as the phpmp_modules table in the user's ! database. This contains the module's name, filename, Unix-qualified ! identifier, information on whether or not the module is actuve, and ! any data the module wishes to store in a single-string variable (which ! can be split, exploded, that sort of thing). ! ! Access the data string through $MPCONF['MOD']['data']. Alrighty...so. I guess the template object should be explained a bit. *************** *** 53,62 **** 1. $Template->PrintHeader() - Prints everything up to the left-side menu. 2. $Template->CreateSide('left') - Creates the left-side menu and table. ! 3. $Template->Blocking('BeginMain') - Begins the main/mid section of the table. Used for main content. If this is not called, most designs will be thrown COMPLETELY out of whack. ! 4. $Module->MakeContent() - Creates module content. Should contain BeginBig and EndBig statements. 5. $Template->Blocking('EndMain') - Ends the main/mid section of the table. 6. $Template->CreateSide('right') - Creates the left-side menu and table. 7. $Template->PrintFooter() - Prints copyright and any additional info needed. Next I'll explain the DBA class. It is used to access databases. --- 66,81 ---- 1. $Template->PrintHeader() - Prints everything up to the left-side menu. 2. $Template->CreateSide('left') - Creates the left-side menu and table. ! 3. $Template->Blocking('BeginMain') - Begins the main/mid section of the table. ! Used for main content. If this is not called, most designs will be thrown COMPLETELY out of whack. ! 4. $Module->MakeContent() - Creates module content. Should contain BeginBig and ! EndBig statements. 5. $Template->Blocking('EndMain') - Ends the main/mid section of the table. 6. $Template->CreateSide('right') - Creates the left-side menu and table. 7. $Template->PrintFooter() - Prints copyright and any additional info needed. + + Note that in future versions this order might (almost definitely) change. In that case, + your module will cease to function correctly. In the near future, version limitations + will be added so you won't have to worry about such things occuring. Next I'll explain the DBA class. It is used to access databases. *************** *** 89,93 **** These values are: ! $blockname - Title that is displaye in headerbar of block. $content - The HTML used to produce the main content of the block. --- 108,112 ---- These values are: ! $blockname - Title that is displayed in headerbar of block. $content - The HTML used to produce the main content of the block. *************** *** 120,129 **** To make the block actually appear, you must add a row to the phpmp_blocking table. ! This is the following format for a typical blocked module row: ! blockname - Used if $blockname can be static. You may then ommit the $content var. ! side - Right or Left. Self Explanatory. weight - lowest number comes first i.e. a module with a weight of 1 is displayed ! above one with a weight of 2. content - If block is COMPLETELY static with no PHP, you may put the $content here. is_php - Set to one if using external file. Set to 0 if content column is set. --- 139,152 ---- To make the block actually appear, you must add a row to the phpmp_blocking table. ! Eventually this will be handled by the administration area, but for now we get to ! do it manually! This is the following format for a typical blocked module row: ! blockname - $blockname is initially set to this. If creating a file-based block, ! you may override it (for dynamic change of the blockname) by setting ! $blockname to something else. ! side - Right or left. Self Explanatory. weight - lowest number comes first i.e. a module with a weight of 1 is displayed ! above one with a weight of 2. If two or more modules have the same weight, ! they will be sorted in the order in which they were added to the database. content - If block is COMPLETELY static with no PHP, you may put the $content here. is_php - Set to one if using external file. Set to 0 if content column is set. |
From: Brian R. <hei...@us...> - 2002-07-21 21:43:36
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv22717/templates/TealMP Modified Files: blocking.cfg header.tpl Log Message: Moved a few template variables around. Before, the site name was hardcoded into the system. Now, it is referenced only in templates, where it should be. Index: blocking.cfg =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/blocking.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** blocking.cfg 9 Apr 2002 22:05:25 -0000 1.2 --- blocking.cfg 21 Jul 2002 21:43:33 -0000 1.3 *************** *** 12,16 **** <td height="20" class="tabletitle"> <table width="100%" class="tabletitle" bordercolor=black background="'.$MPCONF['GEN']['uri'].'/templates/'.$MPCONF['TPL']['tpl_name'].'/images/navbg.gif"><tr><td width="100%" class="tabletitle" bordercolor=black> ! <font color=white><small>{PAGETITLE}</small></font> </td></tr></table> </td> --- 12,16 ---- <td height="20" class="tabletitle"> <table width="100%" class="tabletitle" bordercolor=black background="'.$MPCONF['GEN']['uri'].'/templates/'.$MPCONF['TPL']['tpl_name'].'/images/navbg.gif"><tr><td width="100%" class="tabletitle" bordercolor=black> ! <font color=white><small>.:: {SITENAME} :: {PAGETITLE} ::.</small></font> </td></tr></table> </td> Index: header.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/header.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** header.tpl 9 Apr 2002 03:59:01 -0000 1.1 --- header.tpl 21 Jul 2002 21:43:33 -0000 1.2 *************** *** 2,6 **** <html> <head> ! <title>{PAGETITLE}</title> <script src="{MPURLPATH}/templates/{TPLNAME}/js/fade.js" language="Javascript"></script> <link rel="stylesheet" href="{MPURLPATH}/templates/{TPLNAME}/css/tpl_style.css" type="text/css" /> --- 2,6 ---- <html> <head> ! <title>.:: {SITENAME} :: {PAGETITLE} ::.</title> <script src="{MPURLPATH}/templates/{TPLNAME}/js/fade.js" language="Javascript"></script> <link rel="stylesheet" href="{MPURLPATH}/templates/{TPLNAME}/css/tpl_style.css" type="text/css" /> |
From: Brian R. <hei...@us...> - 2002-07-21 21:43:36
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv22717/modules Modified Files: simple_news.php usercp.php Log Message: Moved a few template variables around. Before, the site name was hardcoded into the system. Now, it is referenced only in templates, where it should be. Index: simple_news.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/simple_news.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** simple_news.php 23 Apr 2002 08:14:55 -0000 1.2 --- simple_news.php 21 Jul 2002 21:43:33 -0000 1.3 *************** *** 10,14 **** function Init() { ! $this->pagetitle = "phpMP :: Latest News"; } --- 10,14 ---- function Init() { ! $this->pagetitle = "Latest News"; } Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** usercp.php 21 Jul 2002 20:58:39 -0000 1.5 --- usercp.php 21 Jul 2002 21:43:33 -0000 1.6 *************** *** 8,17 **** function Init() { ! $this->pagetitle = "phpMP :: User Control Panel"; } function MakeContent() { global $Template; ! $Template->Blocking('BeginBig', array(PAGETITLE => ".:: phpMP :: " . $this->pagetitle . "::.")); print "This is a test...<br>This is only a test...<br>\n"; --- 8,17 ---- function Init() { ! $this->pagetitle = "User Control Panel"; } function MakeContent() { global $Template; ! $Template->Blocking('BeginBig', array(PAGETITLE => $this->pagetitle)); print "This is a test...<br>This is only a test...<br>\n"; |
From: Brian R. <hei...@us...> - 2002-07-21 21:43:36
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv22717/includes Modified Files: constants.php template.php Log Message: Moved a few template variables around. Before, the site name was hardcoded into the system. Now, it is referenced only in templates, where it should be. Index: constants.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** constants.php 3 Apr 2002 11:38:18 -0000 1.3 --- constants.php 21 Jul 2002 21:43:33 -0000 1.4 *************** *** 1,6 **** <? ! $MPCONF['TPL']['copyright'] .= "powered by phpMP " . $MPCONF['GEN']['version'] . " © 2002 <a href=\"http://phpmp.sourceforge.net/\">phpMP Dev. Group</a><br>\n"; ! $MPCONF['TPL']['copyright'] .= "All logos, trademarks, and content are copyrighted<br>\nby their respective owner. All rights reserved."; ?> --- 1,6 ---- <? ! $MPCONF['TPL']['copyright'] .= "powered by phpMP " . $MPCONF['GEN']['version'] . " © 2002 <a href=\"http://phpmp.sourceforge.net/\">phpMP Dev. Group</a>.<br>\n"; ! $MPCONF['TPL']['copyright'] .= "All content is property of its respective owner. All rights reserved."; ?> Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** template.php 23 Apr 2002 08:14:55 -0000 1.14 --- template.php 21 Jul 2002 21:43:33 -0000 1.15 *************** *** 75,78 **** --- 75,80 ---- $array['TPLNAME'] = $MPCONF['TPL']['tpl_name']; $array['COPYRIGHT'] = $MPCONF['TPL']['copyright']; + $array['SITENAME'] = $MPCONF['TPL']['sitename']; + $array['BULLET-HTML'] = $MPCONF['TPL']['bullet_html']; include($MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/tplvars.cfg'); |
From: Brian R. <hei...@us...> - 2002-07-21 21:43:36
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv22717 Modified Files: index.php Log Message: Moved a few template variables around. Before, the site name was hardcoded into the system. Now, it is referenced only in templates, where it should be. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** index.php 23 Apr 2002 08:14:54 -0000 1.15 --- index.php 21 Jul 2002 21:43:33 -0000 1.16 *************** *** 49,53 **** // Start The Page ! $Template->PrintHeader( array(PAGETITLE => ".::phpMP Sample Page::.") ); // Display The Left Side --- 49,53 ---- // Start The Page ! $Template->PrintHeader( array(PAGETITLE => "Home") ); // Display The Left Side *************** *** 57,61 **** $Template->Blocking('BeginMain'); ! $Template->Blocking('BeginBig', array(PAGETITLE => ".::phpMP Sample Page::.")); print "Welcome, one and all!!!!!<br>\n"; --- 57,61 ---- $Template->Blocking('BeginMain'); ! $Template->Blocking('BeginBig', array(PAGETITLE => "Home")); print "Welcome, one and all!!!!!<br>\n"; |
From: Brian R. <hei...@us...> - 2002-07-21 21:43:36
|
Update of /cvsroot/phpmp/phpMP/docs In directory usw-pr-cvs1:/tmp/cvs-serv22717/docs Modified Files: MODULES Log Message: Moved a few template variables around. Before, the site name was hardcoded into the system. Now, it is referenced only in templates, where it should be. Index: MODULES =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/MODULES,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MODULES 23 Apr 2002 08:14:55 -0000 1.2 --- MODULES 21 Jul 2002 21:43:33 -0000 1.3 *************** *** 31,35 **** // If you need to call other functions after this one, call them at the end. global $Template; // Makes the $Template class global. ! $Template->Blocking('BeginBig', array(PAGETITLE => ".:: phpMP :: " . $this->pagetitle . "::.")); // Begins a 'big' middle block. print "This is a test...<br>This is only a test...<br>\n"; // Prints a line. --- 31,35 ---- // If you need to call other functions after this one, call them at the end. global $Template; // Makes the $Template class global. ! $Template->Blocking('BeginBig', array(PAGETITLE => $this->pagetitle)); // Begins a 'big' middle block. print "This is a test...<br>This is only a test...<br>\n"; // Prints a line. |
From: Brian R. <hei...@us...> - 2002-07-21 20:58:42
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv10822 Modified Files: usercp.php Log Message: Fixed title of document (like this really needed to be commited). Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** usercp.php 23 Apr 2002 08:14:55 -0000 1.4 --- usercp.php 21 Jul 2002 20:58:39 -0000 1.5 *************** *** 8,12 **** function Init() { ! $this->pagetitle = "User Control Panel"; } --- 8,12 ---- function Init() { ! $this->pagetitle = "phpMP :: User Control Panel"; } |
From: Brian R. <hei...@us...> - 2002-07-21 20:49:43
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv8456/modules Modified Files: user_side.php Log Message: Fixed a small bug that would not allow logins to work properly on URLs requiring a parameter. Index: user_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/user_side.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** user_side.php 11 Apr 2002 05:40:15 -0000 1.7 --- user_side.php 21 Jul 2002 20:49:40 -0000 1.8 *************** *** 2,6 **** $identFile = "user_side.php"; ! global $PHP_SELF, $content; if($MPCONF['USR']['username'] != "Anonymous") { --- 2,6 ---- $identFile = "user_side.php"; ! global $REQUEST_URI, $content; if($MPCONF['USR']['username'] != "Anonymous") { *************** *** 17,21 **** } else { $blockname = "Login"; ! $content .= "<form action='" . $PHP_SELF . "' method='post'>\n"; $content .= "<table>\n"; $content .= " <tr>\n"; --- 17,21 ---- } else { $blockname = "Login"; ! $content .= "<form action='" . $REQUEST_URI . "' method='post'>\n"; $content .= "<table>\n"; $content .= " <tr>\n"; |
From: Brian R. <hei...@us...> - 2002-05-25 17:49:32
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv28839 Modified Files: auth.php Log Message: Realized that sessions lasted one second. Fixed that. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** auth.php 23 Apr 2002 08:14:55 -0000 1.11 --- auth.php 25 May 2002 17:49:28 -0000 1.12 *************** *** 79,83 **** $cookiename = $MPCONF['SES']['normcookie']; ! $this->cookietime = time(); if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { $enc_password = md5($HTTP_POST_VARS['password']); --- 79,83 ---- $cookiename = $MPCONF['SES']['normcookie']; ! $this->cookietime = time() + $MPCONF['SES']['cookietime']; if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { $enc_password = md5($HTTP_POST_VARS['password']); |
From: Brian R. <hei...@us...> - 2002-04-23 08:14:58
|
Update of /cvsroot/phpmp/phpMP/docs In directory usw-pr-cvs1:/tmp/cvs-serv20908/docs Modified Files: LICENSE MODULES Log Message: Changed license; added double-include security. Index: LICENSE =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/LICENSE,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** LICENSE 29 Mar 2002 21:26:50 -0000 1.1 --- LICENSE 23 Apr 2002 08:14:55 -0000 1.2 *************** *** 1,36 **** ! Copyright (c) 2002, phpMP Development Group ! All rights reserved. ! Redistribution and use in source and binary forms, ! with or without modification, are permitted provided ! that the following conditions are met: ! ! 1. Redistributions of source code must retain the ! above copyright notice, this list of conditions ! and the following disclaimer. ! ! 2. Redistributions in binary form must reproduce ! the above copyright notice, this list of ! conditions and the following disclaimer in the ! documentation and/or other materials provided ! with the distribution. ! ! 3. Neither the name of the phpMP Development Group ! nor the names of its contributors may be used to ! endorse or promote products derived from this ! software without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ! CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ! INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ! WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH ! DAMAGE. \ No newline at end of file --- 1,280 ---- ! GNU GENERAL PUBLIC LICENSE ! Version 2, June 1991 ! Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! Preamble ! ! The licenses for most software are designed to take away your ! freedom to share and change it. By contrast, the GNU General Public ! License is intended to guarantee your freedom to share and change free ! software--to make sure the software is free for all its users. This ! General Public License applies to most of the Free Software ! Foundation's software and to any other program whose authors commit to ! using it. (Some other Free Software Foundation software is covered by ! the GNU Library General Public License instead.) You can apply it to ! your programs, too. ! ! When we speak of free software, we are referring to freedom, not ! price. Our General Public Licenses are designed to make sure that you ! have the freedom to distribute copies of free software (and charge for ! this service if you wish), that you receive source code or can get it ! if you want it, that you can change the software or use pieces of it ! in new free programs; and that you know you can do these things. ! ! To protect your rights, we need to make restrictions that forbid ! anyone to deny you these rights or to ask you to surrender the rights. ! These restrictions translate to certain responsibilities for you if you ! distribute copies of the software, or if you modify it. ! ! For example, if you distribute copies of such a program, whether ! gratis or for a fee, you must give the recipients all the rights that ! you have. You must make sure that they, too, receive or can get the ! source code. And you must show them these terms so they know their ! rights. ! ! We protect your rights with two steps: (1) copyright the software, and ! (2) offer you this license which gives you legal permission to copy, ! distribute and/or modify the software. ! ! Also, for each author's protection and ours, we want to make certain ! that everyone understands that there is no warranty for this free ! software. If the software is modified by someone else and passed on, we ! want its recipients to know that what they have is not the original, so ! that any problems introduced by others will not reflect on the original ! authors' reputations. ! ! Finally, any free program is threatened constantly by software ! patents. We wish to avoid the danger that redistributors of a free ! program will individually obtain patent licenses, in effect making the ! program proprietary. To prevent this, we have made it clear that any ! patent must be licensed for everyone's free use or not licensed at all. ! ! The precise terms and conditions for copying, distribution and ! modification follow. ! ! GNU GENERAL PUBLIC LICENSE ! TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ! ! 0. This License applies to any program or other work which contains ! a notice placed by the copyright holder saying it may be distributed ! under the terms of this General Public License. The "Program", below, ! refers to any such program or work, and a "work based on the Program" ! means either the Program or any derivative work under copyright law: ! that is to say, a work containing the Program or a portion of it, ! either verbatim or with modifications and/or translated into another ! language. (Hereinafter, translation is included without limitation in ! the term "modification".) Each licensee is addressed as "you". ! ! Activities other than copying, distribution and modification are not ! covered by this License; they are outside its scope. The act of ! running the Program is not restricted, and the output from the Program ! is covered only if its contents constitute a work based on the ! Program (independent of having been made by running the Program). ! Whether that is true depends on what the Program does. ! ! 1. You may copy and distribute verbatim copies of the Program's ! source code as you receive it, in any medium, provided that you ! conspicuously and appropriately publish on each copy an appropriate ! copyright notice and disclaimer of warranty; keep intact all the ! notices that refer to this License and to the absence of any warranty; ! and give any other recipients of the Program a copy of this License ! along with the Program. ! ! You may charge a fee for the physical act of transferring a copy, and ! you may at your option offer warranty protection in exchange for a fee. ! ! 2. You may modify your copy or copies of the Program or any portion ! of it, thus forming a work based on the Program, and copy and ! distribute such modifications or work under the terms of Section 1 ! above, provided that you also meet all of these conditions: ! ! a) You must cause the modified files to carry prominent notices ! stating that you changed the files and the date of any change. ! ! b) You must cause any work that you distribute or publish, that in ! whole or in part contains or is derived from the Program or any ! part thereof, to be licensed as a whole at no charge to all third ! parties under the terms of this License. ! ! c) If the modified program normally reads commands interactively ! when run, you must cause it, when started running for such ! interactive use in the most ordinary way, to print or display an ! announcement including an appropriate copyright notice and a ! notice that there is no warranty (or else, saying that you provide ! a warranty) and that users may redistribute the program under ! these conditions, and telling the user how to view a copy of this ! License. (Exception: if the Program itself is interactive but ! does not normally print such an announcement, your work based on ! the Program is not required to print an announcement.) ! ! These requirements apply to the modified work as a whole. If ! identifiable sections of that work are not derived from the Program, ! and can be reasonably considered independent and separate works in ! themselves, then this License, and its terms, do not apply to those ! sections when you distribute them as separate works. But when you ! distribute the same sections as part of a whole which is a work based ! on the Program, the distribution of the whole must be on the terms of ! this License, whose permissions for other licensees extend to the ! entire whole, and thus to each and every part regardless of who wrote it. ! ! Thus, it is not the intent of this section to claim rights or contest ! your rights to work written entirely by you; rather, the intent is to ! exercise the right to control the distribution of derivative or ! collective works based on the Program. ! ! In addition, mere aggregation of another work not based on the Program ! with the Program (or with a work based on the Program) on a volume of ! a storage or distribution medium does not bring the other work under ! the scope of this License. ! ! 3. You may copy and distribute the Program (or a work based on it, ! under Section 2) in object code or executable form under the terms of ! Sections 1 and 2 above provided that you also do one of the following: ! ! a) Accompany it with the complete corresponding machine-readable ! source code, which must be distributed under the terms of Sections ! 1 and 2 above on a medium customarily used for software interchange; or, ! ! b) Accompany it with a written offer, valid for at least three ! years, to give any third party, for a charge no more than your ! cost of physically performing source distribution, a complete ! machine-readable copy of the corresponding source code, to be ! distributed under the terms of Sections 1 and 2 above on a medium ! customarily used for software interchange; or, ! ! c) Accompany it with the information you received as to the offer ! to distribute corresponding source code. (This alternative is ! allowed only for noncommercial distribution and only if you ! received the program in object code or executable form with such ! an offer, in accord with Subsection b above.) ! ! The source code for a work means the preferred form of the work for ! making modifications to it. For an executable work, complete source ! code means all the source code for all modules it contains, plus any ! associated interface definition files, plus the scripts used to ! control compilation and installation of the executable. However, as a ! special exception, the source code distributed need not include ! anything that is normally distributed (in either source or binary ! form) with the major components (compiler, kernel, and so on) of the ! operating system on which the executable runs, unless that component ! itself accompanies the executable. ! ! If distribution of executable or object code is made by offering ! access to copy from a designated place, then offering equivalent ! access to copy the source code from the same place counts as ! distribution of the source code, even though third parties are not ! compelled to copy the source along with the object code. ! ! 4. You may not copy, modify, sublicense, or distribute the Program ! except as expressly provided under this License. Any attempt ! otherwise to copy, modify, sublicense or distribute the Program is ! void, and will automatically terminate your rights under this License. ! However, parties who have received copies, or rights, from you under ! this License will not have their licenses terminated so long as such ! parties remain in full compliance. ! ! 5. You are not required to accept this License, since you have not ! signed it. However, nothing else grants you permission to modify or ! distribute the Program or its derivative works. These actions are ! prohibited by law if you do not accept this License. Therefore, by ! modifying or distributing the Program (or any work based on the ! Program), you indicate your acceptance of this License to do so, and ! all its terms and conditions for copying, distributing or modifying ! the Program or works based on it. ! ! 6. Each time you redistribute the Program (or any work based on the ! Program), the recipient automatically receives a license from the ! original licensor to copy, distribute or modify the Program subject to ! these terms and conditions. You may not impose any further ! restrictions on the recipients' exercise of the rights granted herein. ! You are not responsible for enforcing compliance by third parties to ! this License. ! ! 7. If, as a consequence of a court judgment or allegation of patent ! infringement or for any other reason (not limited to patent issues), ! conditions are imposed on you (whether by court order, agreement or ! otherwise) that contradict the conditions of this License, they do not ! excuse you from the conditions of this License. If you cannot ! distribute so as to satisfy simultaneously your obligations under this ! License and any other pertinent obligations, then as a consequence you ! may not distribute the Program at all. For example, if a patent ! license would not permit royalty-free redistribution of the Program by ! all those who receive copies directly or indirectly through you, then ! the only way you could satisfy both it and this License would be to ! refrain entirely from distribution of the Program. ! ! If any portion of this section is held invalid or unenforceable under ! any particular circumstance, the balance of the section is intended to ! apply and the section as a whole is intended to apply in other ! circumstances. ! ! It is not the purpose of this section to induce you to infringe any ! patents or other property right claims or to contest validity of any ! such claims; this section has the sole purpose of protecting the ! integrity of the free software distribution system, which is ! implemented by public license practices. Many people have made ! generous contributions to the wide range of software distributed ! through that system in reliance on consistent application of that ! system; it is up to the author/donor to decide if he or she is willing ! to distribute software through any other system and a licensee cannot ! impose that choice. ! ! This section is intended to make thoroughly clear what is believed to ! be a consequence of the rest of this License. ! ! 8. If the distribution and/or use of the Program is restricted in ! certain countries either by patents or by copyrighted interfaces, the ! original copyright holder who places the Program under this License ! may add an explicit geographical distribution limitation excluding ! those countries, so that distribution is permitted only in or among ! countries not thus excluded. In such case, this License incorporates ! the limitation as if written in the body of this License. ! ! 9. The Free Software Foundation may publish revised and/or new versions ! of the General Public License from time to time. Such new versions will ! be similar in spirit to the present version, but may differ in detail to ! address new problems or concerns. ! ! Each version is given a distinguishing version number. If the Program ! specifies a version number of this License which applies to it and "any ! later version", you have the option of following the terms and conditions ! either of that version or of any later version published by the Free ! Software Foundation. If the Program does not specify a version number of ! this License, you may choose any version ever published by the Free Software ! Foundation. ! ! 10. If you wish to incorporate parts of the Program into other free ! programs whose distribution conditions are different, write to the author ! to ask for permission. For software which is copyrighted by the Free ! Software Foundation, write to the Free Software Foundation; we sometimes ! make exceptions for this. Our decision will be guided by the two goals ! of preserving the free status of all derivatives of our free software and ! of promoting the sharing and reuse of software generally. ! ! NO WARRANTY ! ! 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ! FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ! OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ! PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ! OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ! MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ! TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ! PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ! REPAIR OR CORRECTION. ! ! 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ! WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ! REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ! INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ! OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ! TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ! YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ! PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGES. ! ! END OF TERMS AND CONDITIONS \ No newline at end of file Index: MODULES =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/MODULES,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MODULES 19 Apr 2002 06:36:36 -0000 1.1 --- MODULES 23 Apr 2002 08:14:55 -0000 1.2 *************** *** 18,22 **** <? ! $file = 'sample_module.php'; // File this code is contained in. class Module { // Standard. ALWAYS included. --- 18,22 ---- <? ! $mod_id = 'SAMPLE'; // File this code is contained in. class Module { // Standard. ALWAYS included. |
From: Brian R. <hei...@us...> - 2002-04-23 08:14:58
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv20908/dba Modified Files: mysql.dba Log Message: Changed license; added double-include security. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** mysql.dba 11 Apr 2002 05:40:15 -0000 1.12 --- mysql.dba 23 Apr 2002 08:14:54 -0000 1.13 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the |
From: Brian R. <hei...@us...> - 2002-04-23 08:14:58
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv20908/includes Modified Files: auth.php core.php dba.php functions.php parser.php template.php Log Message: Changed license; added double-include security. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** auth.php 11 Apr 2002 06:19:11 -0000 1.10 --- auth.php 23 Apr 2002 08:14:55 -0000 1.11 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** core.php 10 Apr 2002 21:22:02 -0000 1.12 --- core.php 23 Apr 2002 08:14:55 -0000 1.13 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the Index: dba.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/dba.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** dba.php 10 Apr 2002 21:22:02 -0000 1.5 --- dba.php 23 Apr 2002 08:14:55 -0000 1.6 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** functions.php 11 Apr 2002 05:40:15 -0000 1.8 --- functions.php 23 Apr 2002 08:14:55 -0000 1.9 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the Index: parser.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/parser.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** parser.php 10 Apr 2002 21:22:02 -0000 1.4 --- parser.php 23 Apr 2002 08:14:55 -0000 1.5 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** template.php 11 Apr 2002 05:40:15 -0000 1.13 --- template.php 23 Apr 2002 08:14:55 -0000 1.14 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the |