phpmp-commits Mailing List for phpMyPublications (Page 20)
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-29 12:22:15
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv8796 Modified Files: index.php Log Message: More and more code cleanup. Changed how the install-detect is handled. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** index.php 25 Jul 2002 20:50:07 -0000 1.18 --- index.php 29 Jul 2002 12:22:12 -0000 1.19 *************** *** 35,39 **** if(!defined("PHPMP_INSTALLED")) { ! die('You have not <a href="install.php">installed phpMP</a>. Please do so before attempting to use this software.'); } --- 35,39 ---- if(!defined("PHPMP_INSTALLED")) { ! header('Location: ./install.php'); } |
From: Brian R. <hei...@us...> - 2002-07-29 11:13:07
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv18728/templates/TealMP Modified Files: index.tpl Log Message: Changed index.tpl to cleaner version (thanks Bruce). Added a few small fixes in others. Index: index.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/index.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** index.tpl 27 Jul 2002 10:41:51 -0000 1.6 --- index.tpl 29 Jul 2002 11:13:04 -0000 1.7 *************** *** 4,8 **** <table width="100%" bgcolor="#9fc2c6" cellspacing="0" cellpadding="2"> ! <tr> --- 4,8 ---- <table width="100%" bgcolor="#9fc2c6" cellspacing="0" cellpadding="2"> ! <tr> *************** *** 10,42 **** ! <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} :: {$l_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 and team!<br /><br /> phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> To find out more about phpMP and the team behind it, visit the <a href="{$mpuri}/about.php">about page</a>.<br /><br /> ! If you encounter any error whatsoever, please <b>don't</b> let us know. This web site is home of the currently-developed code, meaning it is constantly changing and can be considered pre-alpha quality.<br /> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> </td> --- 10,42 ---- ! <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} || {$l_home} ||</small></font> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! <tr> ! <td> <table width="100%" class="tableborder" bordercolor=black> ! <tr> ! <td> ! <font color="#00000" face="Tahoma" size=2>Welcome to the home of the phpMP project and team!<br /><br /> phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> To find out more about phpMP and the team behind it, visit the <a href="{$mpuri}/about.php">about page</a>.<br /><br /> ! If you encounter any error whatsoever, please <b>don't</b> let us know. This web site is home of the currently-developed code, meaning it is constantly changing and can be considered pre-alpha quality.</font><br /> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> </td> |
From: Brian R. <hei...@us...> - 2002-07-29 11:13:07
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv18728/modules Modified Files: online_users_side.php Log Message: Changed index.tpl to cleaner version (thanks Bruce). Added a few small fixes in others. Index: online_users_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/online_users_side.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** online_users_side.php 27 Jul 2002 12:16:50 -0000 1.1 --- online_users_side.php 29 Jul 2002 11:13:04 -0000 1.2 *************** *** 13,18 **** $anon_num = $DBA->num_rows($anon_qry); $mem_num = $DBA->num_rows($mem_qry); ! $content .= '<font size="-3">:: ' . $anon_num . ' Anonymous Users<br />' . "\n"; $content .= ':: ' . $mem_num . ' Members<br /></font>' . "\n"; --- 13,20 ---- $anon_num = $DBA->num_rows($anon_qry); $mem_num = $DBA->num_rows($mem_qry); + $total_num = $anon_num + $mem_num; ! $content .= '<font size="-3">' . $total_num . ' Users Online<br />' . "\n"; ! $content .= ':: ' . $anon_num . ' Anonymous Users<br />' . "\n"; $content .= ':: ' . $mem_num . ' Members<br /></font>' . "\n"; |
From: Brian R. <hei...@us...> - 2002-07-29 11:13:07
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv18728/includes Modified Files: auth.php Log Message: Changed index.tpl to cleaner version (thanks Bruce). Added a few small fixes in others. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** auth.php 27 Jul 2002 12:16:00 -0000 1.15 --- auth.php 29 Jul 2002 11:13:04 -0000 1.16 *************** *** 51,57 **** } ! //if (empty($_REQUEST['PHPSESSID'])) { ! //SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); ! //} if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { --- 51,57 ---- } ! if (empty($_REQUEST['PHPSESSID'])) { ! SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); ! } if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { |
From: Brian R. <hei...@us...> - 2002-07-27 12:16:53
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv9406 Added Files: online_users_side.php Log Message: Added online user information module. --- NEW FILE: online_users_side.php --- <? $identFile = "online_users_side.php"; global $MPCONF, $content; $blockname = "Online Users\n"; $five_min_mark = time() - 300; $anon_qry = $DBA->query("SELECT user_id FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE user_id = '1' AND time_started > " . $five_min_mark); $mem_qry = $DBA->query("SELECT user_id FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE user_id != '1' AND time_started > " . $five_min_mark); $anon_num = $DBA->num_rows($anon_qry); $mem_num = $DBA->num_rows($mem_qry); $content .= '<font size="-3">:: ' . $anon_num . ' Anonymous Users<br />' . "\n"; $content .= ':: ' . $mem_num . ' Members<br /></font>' . "\n"; ?> |
From: Brian R. <hei...@us...> - 2002-07-27 12:16:03
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv9208/includes Modified Files: auth.php core.php functions.php sessions.php template_ext.php Log Message: Fixed things related to session problems. A new session will now be created when logging in. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** auth.php 27 Jul 2002 10:44:08 -0000 1.14 --- auth.php 27 Jul 2002 12:16:00 -0000 1.15 *************** *** 44,57 **** function AuthUser() { ! session_start(); //if (empty($_REQUEST['PHPSESSID'])) { ! //SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); //} - - global $MPCONF, $DBA, $HTTP_POST_VARS; if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { $enc_password = md5($HTTP_POST_VARS['password']); --- 44,64 ---- function AuthUser() { ! ! global $MPCONF, $Functions, $DBA, $HTTP_POST_VARS; ! ! if(empty($HTTP_POST_VARS['username'])) { ! session_start(); ! } //if (empty($_REQUEST['PHPSESSID'])) { ! //SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); //} if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { + $new_key = $Functions->createHash(); + session_id($new_key); + session_start(); + $enc_password = md5($HTTP_POST_VARS['password']); *************** *** 60,67 **** if($num_rows > 0) { $user_array = $DBA->fetch_array($result); - $_SESSION['user_array'] = $user_array; - $MPCONF['USR'] = $user_array; $this->AuthAdmin(); --- 67,75 ---- if($num_rows > 0) { $user_array = $DBA->fetch_array($result); $MPCONF['USR'] = $user_array; + unset($_SESSION['user_array']); + $_SESSION['user_array'] = $user_array; + $this->AuthAdmin(); *************** *** 69,76 **** header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=auth"); } ! } elseif(isset($_SESSION['user_array'])) { $MPCONF['USR'] = $_SESSION['user_array']; - $sess_user = $MPCONF['USR']['username']; $this->AuthAdmin(); --- 77,83 ---- header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=auth"); } ! } elseif(!empty($_SESSION['user_array'])) { $MPCONF['USR'] = $_SESSION['user_array']; $this->AuthAdmin(); *************** *** 102,108 **** $user_array = $DBA->fetch_array($result); - $_SESSION['user_array'] = $user_array; - $MPCONF['USR'] = $user_array; } --- 109,115 ---- $user_array = $DBA->fetch_array($result); $MPCONF['USR'] = $user_array; + + $_SESSION['user_array'] = $user_array; } Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** core.php 27 Jul 2002 05:35:59 -0000 1.18 --- core.php 27 Jul 2002 12:16:00 -0000 1.19 *************** *** 87,91 **** } ! global $DBA, $Auth, $Template, $Language; $DBA = new DBA(); --- 87,91 ---- } ! global $DBA, $Auth, $Functions, $Template, $Language; $DBA = new DBA(); Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** functions.php 25 Jul 2002 06:16:22 -0000 1.10 --- functions.php 27 Jul 2002 12:16:00 -0000 1.11 *************** *** 44,47 **** --- 44,61 ---- } } + + function createHash($length=32, $pool="") { + if($pool == ""){ + $pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + $pool .= "abcdefghijklmnopqrstuvwxyz"; + $pool .= "0123456789"; + } + mt_srand ((double) microtime() * 1000000); + $unique_id = ""; + for ($index = 0; $index < $length; $index++) { + $unique_id .= substr($pool, (mt_rand()%(strlen($pool))), 1); + } + return $unique_id; + } } Index: sessions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/sessions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** sessions.php 27 Jul 2002 10:44:08 -0000 1.2 --- sessions.php 27 Jul 2002 12:16:00 -0000 1.3 *************** *** 66,73 **** $value = addslashes($val); ! $retval = $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, data) VALUES ('$sesskey', '" . $expiry . "', '$value')"); if(!($retval)) { ! $retval = $DBA->query("UPDATE " . $MPCONF['DB']['table_prefix'] . "sessions SET data = '$val', expiretime = '" . $expiry . "' WHERE sesskey = '$sesskey'"); } --- 66,73 ---- $value = addslashes($val); ! $retval = $DBA->query("UPDATE " . $MPCONF['DB']['table_prefix'] . "sessions SET data = '$value', user_id = '" . $MPCONF['USR']['user_id'] . "', time_started = '" . time() . "' expiretime = '" . $expiry . "' WHERE sesskey = '$sesskey'"); if(!($retval)) { ! $retval = $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, user_id, time_started, expiretime, data) VALUES ('$sesskey', '" . $MPCONF['USR']['user_id'] . "', '" . time() . "', '" . $expiry . "', '$value')"); } Index: template_ext.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template_ext.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** template_ext.php 26 Jul 2002 05:25:06 -0000 1.3 --- template_ext.php 27 Jul 2002 12:16:00 -0000 1.4 *************** *** 51,54 **** --- 51,58 ---- global $MPCONF; + //if($MPCONF['USR']['usr_tpl'] != '') { + //$MPCONF['TPL']['tpl_name'] = $MPCONF['USR']['usr_tpl']; + //} + $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'; *************** *** 62,66 **** function add_blocks($side) { ! global $MPCONF, $DBA; $sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "blocking WHERE side='" . $side . "' ORDER BY weight"; --- 66,70 ---- function add_blocks($side) { ! global $MPCONF, $DBA, $blockname, $content; $sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "blocking WHERE side='" . $side . "' ORDER BY weight"; |
From: Brian R. <hei...@us...> - 2002-07-27 12:16:03
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv9208/dba Modified Files: mysql.dba Log Message: Fixed things related to session problems. A new session will now be created when logging in. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** mysql.dba 27 Jul 2002 10:44:08 -0000 1.15 --- mysql.dba 27 Jul 2002 12:16:00 -0000 1.16 *************** *** 150,154 **** } ! function result($result, $row, $field='') { if($this->identLink == 0) { $db = $this->connect(); --- 150,154 ---- } ! function result($result, $row=0, $field='') { if($this->identLink == 0) { $db = $this->connect(); |
From: Brian R. <hei...@us...> - 2002-07-27 10:44:11
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv26391/includes Modified Files: auth.php sessions.php Log Message: Removed two error reports in the MySQL DBA that shouldn't have been there. Subsequently, this fixed the problem with the new session routines. Go figure. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** auth.php 27 Jul 2002 05:35:59 -0000 1.13 --- auth.php 27 Jul 2002 10:44:08 -0000 1.14 *************** *** 46,52 **** session_start(); ! if (empty($_REQUEST['PHPSESSID'])) { ! SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); ! } global $MPCONF, $DBA, $HTTP_POST_VARS; --- 46,52 ---- session_start(); ! //if (empty($_REQUEST['PHPSESSID'])) { ! //SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); ! //} global $MPCONF, $DBA, $HTTP_POST_VARS; *************** *** 138,142 **** global $MPCONF, $DBA; ! session_unregister('user_array'); $DBA->query('DELETE FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE sesskey = "' . session_id() . '"'); --- 138,142 ---- global $MPCONF, $DBA; ! unset($_SESSION['user_array']); $DBA->query('DELETE FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE sesskey = "' . session_id() . '"'); Index: sessions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/sessions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** sessions.php 27 Jul 2002 05:35:59 -0000 1.1 --- sessions.php 27 Jul 2002 10:44:08 -0000 1.2 *************** *** 41,107 **** ini_set ( "session.save_handler", "user"); ! function mysql_session_open ($save_path, $session_name) { return true; } ! function mysql_session_close() { return true; } ! function mysql_session_read ($sesskey) { global $MPCONF, $DBA; ! $SessionID = addslashes($sesskey); ! ! $session_data = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'") or die(db_error_message()); ! if ($DBA->num_rows($session_data) == 1) { ! return $DBA->result($session_data, 0); } else { ! return false; } } ! function mysql_session_write ($sesskey, $val) { ! global $MPCONF, $DBA; ! ! $sesskey = addslashes($sesskey); ! $val = addslashes($val); ! ! $sess_exists = $DBA->result($DBA->query("SELECT COUNT(*) FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'"), 0); ! ! if ($sess_exists == 0) { ! $retval = $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, data) VALUES ('$sesskey', '" . time() . "', '$val')"); ! } else { ! $retval = $DBA->query("UPDATE " . $MPCONF['DB']['table_prefix'] . "sessions SET data = '$val', expiretime = '" . time() . "' WHERE sesskey = '$sesskey'"); ! if ($DBA->affected_rows() < 0) { ! error_log("unable to update session data for session $sesskey"); ! } ! } return $retval; } ! function mysql_session_destroy ($sesskey) { global $MPCONF, $DBA; - $sesskey = addslashes($sesskey); - $retval = $DBA->query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'"); return $retval; } ! function mysql_session_gc ($maxlifetime = 300) { ! global $MPCONF, $DBA; $retval = mysql_query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE expiretime < " . time()); ! return $retval; } session_set_save_handler ( ! 'mysql_session_open', ! 'mysql_session_close', ! 'mysql_session_read', ! 'mysql_session_write', ! 'mysql_session_destroy', ! 'mysql_session_gc' ); --- 41,100 ---- ini_set ( "session.save_handler", "user"); ! function sess_open ($save_path, $session_name) { return true; } ! function sess_close() { return true; } ! function sess_read ($sesskey) { global $MPCONF, $DBA; ! $session_data = $DBA->query("SELECT data FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey' and expiretime > " . time()) or die(db_error_message()); ! if (list($value) = $DBA->fetch_row($session_data)) { ! return $value; } else { ! return ''; } } ! function sess_write ($sesskey, $val) { ! global $MPCONF, $DBA; ! ! $expiry = time() + $MPCONF['SES']['session_length']; ! $value = addslashes($val); ! ! $retval = $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, data) VALUES ('$sesskey', '" . $expiry . "', '$value')"); ! ! if(!($retval)) { ! $retval = $DBA->query("UPDATE " . $MPCONF['DB']['table_prefix'] . "sessions SET data = '$val', expiretime = '" . $expiry . "' WHERE sesskey = '$sesskey'"); ! } return $retval; } ! function sess_destroy ($sesskey) { global $MPCONF, $DBA; $retval = $DBA->query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'"); return $retval; } ! function sess_gc ($maxlifetime) { ! global $MPCONF, $DBA; ! $retval = mysql_query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE expiretime < " . time()); ! ! return $DBA->affected_rows(); } session_set_save_handler ( ! 'sess_open', ! 'sess_close', ! 'sess_read', ! 'sess_write', ! 'sess_destroy', ! 'sess_gc' ); |
From: Brian R. <hei...@us...> - 2002-07-27 10:44:11
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv26391/dba Modified Files: mysql.dba Log Message: Removed two error reports in the MySQL DBA that shouldn't have been there. Subsequently, this fixed the problem with the new session routines. Go figure. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** mysql.dba 25 Jul 2002 06:16:22 -0000 1.14 --- mysql.dba 27 Jul 2002 10:44:08 -0000 1.15 *************** *** 106,110 **** else { // Execute query ! $result = @mysql_query($query, $db) or die("MySQL Error: ".@mysql_error($db)); // $result = mysql_query($query, $db); } --- 106,110 ---- else { // Execute query ! $result = @mysql_query($query, $db); // $result = mysql_query($query, $db); } *************** *** 125,129 **** else { // Execute query ! $result = @mysql_select_db($db_name, $db) or die("MySQL Error: ".@mysql_error($db)); } return $result; --- 125,129 ---- else { // Execute query ! $result = @mysql_select_db($db_name, $db); } return $result; |
From: Brian R. <hei...@us...> - 2002-07-27 10:41:57
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv26169 Modified Files: index.tpl Log Message: Changed that intro paragraph again. Gotta seperate the site and relative code at some point... Index: index.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/index.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** index.tpl 27 Jul 2002 05:35:59 -0000 1.5 --- index.tpl 27 Jul 2002 10:41:51 -0000 1.6 *************** *** 32,36 **** Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> To find out more about phpMP and the team behind it, visit the <a href="{$mpuri}/about.php">about page</a>.<br /><br /> ! 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 /> </td> </tr> --- 32,36 ---- Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> To find out more about phpMP and the team behind it, visit the <a href="{$mpuri}/about.php">about page</a>.<br /><br /> ! If you encounter any error whatsoever, please <b>don't</b> let us know. This web site is home of the currently-developed code, meaning it is constantly changing and can be considered pre-alpha quality.<br /> </td> </tr> |
From: Brian R. <hei...@us...> - 2002-07-27 05:36:02
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv25420/includes Modified Files: auth.php core.php Added Files: sessions.php Log Message: Attempt at adding PHP session support in the Auth system. Not exactly working, but at least we'll be able to view the code from the CVS web repo. Removed the 'designed by trevorj' notice on the template, since he's the lead designer and gets enough recognition already. :-P --- NEW FILE: sessions.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/sessions.php Usage & Function: Contains Session Handlers Create Date: July 26, 2002 $Id: sessions.php,v 1.1 2002/07/27 05:35:59 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. ******************************************************************************* ******************************************************************************/ ini_set ( "session.save_handler", "user"); function mysql_session_open ($save_path, $session_name) { return true; } function mysql_session_close() { return true; } function mysql_session_read ($sesskey) { global $MPCONF, $DBA; $SessionID = addslashes($sesskey); $session_data = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'") or die(db_error_message()); if ($DBA->num_rows($session_data) == 1) { return $DBA->result($session_data, 0); } else { return false; } } function mysql_session_write ($sesskey, $val) { global $MPCONF, $DBA; $sesskey = addslashes($sesskey); $val = addslashes($val); $sess_exists = $DBA->result($DBA->query("SELECT COUNT(*) FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'"), 0); if ($sess_exists == 0) { $retval = $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, data) VALUES ('$sesskey', '" . time() . "', '$val')"); } else { $retval = $DBA->query("UPDATE " . $MPCONF['DB']['table_prefix'] . "sessions SET data = '$val', expiretime = '" . time() . "' WHERE sesskey = '$sesskey'"); if ($DBA->affected_rows() < 0) { error_log("unable to update session data for session $sesskey"); } } return $retval; } function mysql_session_destroy ($sesskey) { global $MPCONF, $DBA; $sesskey = addslashes($sesskey); $retval = $DBA->query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE sesskey = '$sesskey'"); return $retval; } function mysql_session_gc ($maxlifetime = 300) { global $MPCONF, $DBA; $retval = mysql_query("DELETE FROM " . $MPCONF['DB']['table_prefix'] . "sessions WHERE expiretime < " . time()); return $retval; } session_set_save_handler ( 'mysql_session_open', 'mysql_session_close', 'mysql_session_read', 'mysql_session_write', 'mysql_session_destroy', 'mysql_session_gc' ); ?> Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** auth.php 25 May 2002 17:49:28 -0000 1.12 --- auth.php 27 Jul 2002 05:35:59 -0000 1.13 *************** *** 1,4 **** <? - /****************************************************************************** ******************************************************************************* --- 1,3 ---- *************** *** 15,20 **** Filename: /includes/auth.php ! Usage & Function: Contains Auth Class & session decs ! Create Date: March 31, 2002 $Id$ --- 14,19 ---- Filename: /includes/auth.php ! Usage & Function: Contains Auth Class ! Create Date: March 29, 2002 $Id$ *************** *** 29,137 **** ******************************************************************************* ******************************************************************************/ - // Auth class contains all authentication functions class Auth { ! var $mpcookie; ! var $UserVars; ! var $isadmin; ! var $isgod; ! var $priveleges; ! var $cookietime; ! ! function KillOldSessions() { ! global $MPCONF, $DBA; ! $cur_time = time() - $MPCONF['SES']['session_length']; ! $DBA->query('DELETE FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE expiretime < ' . $cur_time); ! ! } ! ! function FetchUserVars($sess_user) { ! global $MPCONF, $DBA; ! ! $userinfo = $DBA->query('SELECT * FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE username="' . $sess_user . '"'); ! ! $this->UserVars = $DBA->fetch_array($userinfo); ! ! return $this->UserVars; ! ! } ! ! function getSessKey($length=24, $pool="") { ! if($pool == ""){ ! $pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ! $pool .= "abcdefghijklmnopqrstuvwxyz"; ! $pool .= "0123456789"; ! } ! mt_srand ((double) microtime() * 1000000); ! $unique_id = ""; ! for ($index = 0; $index < $length; $index++) { ! $unique_id .= substr($pool, (mt_rand()%(strlen($pool))), 1); ! } ! return $unique_id; ! } ! function AuthUser() { ! global $MPCONF, $DBA, $HTTP_POST_VARS, $HTTP_COOKIE_VARS; ! $this->KillOldSessions(); ! $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']); ! $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='{$HTTP_POST_VARS['username']}' AND password='$enc_password'"); $num_rows = $DBA->num_rows($result); if($num_rows > 0) { ! $data = $DBA->fetch_array($result); ! $sess_user = $data['username']; ! $sesskey = $this->getSessKey(); ! $DBA->query('INSERT INTO ' . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, username) VALUES('$sesskey', '" . $this->cookietime . "', '" . $sess_user. "')"); ! setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); ! return $this->FetchUserVars($sess_user); } else { header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=auth"); } ! } elseif($HTTP_COOKIE_VARS[$cookiename]) { ! $sess_user = $HTTP_COOKIE_VARS[$cookiename]; ! $result = $DBA->query('SELECT sesskey FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE username = "' . $sess_user . '"'); ! $num_rows = $DBA->num_rows($result); ! if($num_rows > 0) { ! $DBA->query('UPDATE ' . $MPCONF['DB']['table_prefix'] . 'sessions SET expiretime="' . $this->cookietime . '" WHERE username = "' . $sess_user . '"'); ! return $this->FetchUserVars($sess_user); ! setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); ! } else { ! return $this->FetchUserVars('Anonymous'); ! } ! } elseif($HTTP_COOKIE_VARS[$MPCONF['SES']['extcookie']]) { ! $this->mpcookie = $HTTP_COOKIE_VARS[$MPCONF['SES']['extcookie']]; ! $authstring = $this->mpcookie; ! $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE authstring="' . $authstring . '"'); ! $num_rows = $DBA->num_rows($result); ! if($num_rows > 0) { ! $sess_user = $username; ! $sesskey = $this->getSessKey(); ! $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, username) VALUES('$sesskey', '" . $this->cookietime . "', '$sess_user')"); ! setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); ! return $this->FetchUserVars($sess_user); ! } else { ! header("Location: " . $MPCONF['GEN']['abs_path'] . "/error.php?ecode=auth"); ! } } else { $sess_user = "Anonymous"; ! return $this->FetchUserVars('Anonymous'); ! } ! ! if($this->UserVars['isadmin'] == 1) { ! $this->AuthAdmin(); } --- 28,108 ---- ******************************************************************************* + ******************************************************************************* + + 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 Auth { ! var $mpcookie; ! function AuthUser() { ! session_start(); ! if (empty($_REQUEST['PHPSESSID'])) { ! SetCookie("PHPSESSID", session_id(), (time() + (315360000)), "", "", 0); ! } ! global $MPCONF, $DBA, $HTTP_POST_VARS; ! if(($HTTP_POST_VARS['username'] != "") && ($HTTP_POST_VARS['password'] != "")) { + $enc_password = md5($HTTP_POST_VARS['password']); ! $result = $DBA->query('SELECT * FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='{$HTTP_POST_VARS['username']}' AND password='$enc_password'"); $num_rows = $DBA->num_rows($result); if($num_rows > 0) { ! $user_array = $DBA->fetch_array($result); ! $_SESSION['user_array'] = $user_array; ! ! $MPCONF['USR'] = $user_array; ! $this->AuthAdmin(); } else { header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=auth"); } ! } elseif(isset($_SESSION['user_array'])) { ! $MPCONF['USR'] = $_SESSION['user_array']; ! $sess_user = $MPCONF['USR']['username']; ! $this->AuthAdmin(); ! //} elseif($HTTP_COOKIE_VARS[$MPCONF['SES']['extcookie']]) { ! ! //$this->mpcookie = $HTTP_COOKIE_VARS[$MPCONF['SES']['extcookie']]; ! //$authstring = $this->mpcookie; ! ! //$result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE authstring="' . $authstring . '"'); ! ! //$num_rows = $DBA->num_rows($result); ! //if($num_rows > 0) { ! //$sess_user = $username; ! //$sesskey = $this->getSessKey(); ! //$userdata = $this->FetchUserVars($sess_user); ! //$DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, userid, username) VALUES('$sesskey', '" . $this->cookietime . "', " . $userdata['user_id'] . ", '$sess_user')"); ! //setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); ! //return $userdata; ! ! //} else { ! //header("Location: " . $MPCONF['GEN']['abs_path'] . "/error.php?ecode=auth"); ! //} } else { $sess_user = "Anonymous"; ! $result = $DBA->query('SELECT * FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='Anonymous'"); ! ! $user_array = $DBA->fetch_array($result); ! $_SESSION['user_array'] = $user_array; ! ! $MPCONF['USR'] = $user_array; } *************** *** 139,149 **** function AuthAdmin() { ! if ($this->UserVars["isadmin"] == 1) { ! $this->isadmin = 1; ! if ($this->UserVars["isgod"] == 1) { ! $this->isgod = 1; } --- 110,120 ---- function AuthAdmin() { ! if ($MPCONF['USR']['isadmin'] == 1) { ! $MPCONF['USR']['isadmin'] = 1; ! if ($MPCONF['USR']['isgod'] == 1) { ! $MPCONF['USR']['isadmin'] = 1; } *************** *** 154,158 **** } ! function UpdateUser() { --- 125,133 ---- } ! ! function Register() { ! ! } ! function UpdateUser() { *************** *** 160,167 **** function Logout() { ! } ! } --- 135,149 ---- function Logout() { + + global $MPCONF, $DBA; ! session_unregister('user_array'); ! $DBA->query('DELETE FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE sesskey = "' . session_id() . '"'); ! unset($MPCONF['USR']); ! $this->AuthUser(); ! ! } ! } Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** core.php 26 Jul 2002 09:06:58 -0000 1.17 --- core.php 27 Jul 2002 05:35:59 -0000 1.18 *************** *** 66,75 **** // Main phpMP Class which loads all other files, config options, and modules. class PHPMP{ ! // Loads all core classes, config files, and variables. // Returns: none. function Init($core_files="",$var_files="") { ! global $MPCONF; if($core_files != "") { --- 66,75 ---- // Main phpMP Class which loads all other files, config options, and modules. class PHPMP{ ! // Loads all core classes, config files, and variables. // Returns: none. function Init($core_files="",$var_files="") { ! global $MPCONF, $HTTP_GET_VARS; if($core_files != "") { *************** *** 94,99 **** $Functions->GetConfig(); ! $Auth = new Auth(); //Auth not yet written. ! $MPCONF['USR'] = $Auth->AuthUser(); if($MPCONF['USR']['language'] != '') { --- 94,105 ---- $Functions->GetConfig(); ! include_once($MPCONF['GEN']['abs_path'] . '/includes/sessions.php'); ! ! $Auth = new Auth(); ! $Auth->AuthUser(); ! ! if($HTTP_GET_VARS['logout'] == 'true') { ! $Auth->Logout(); ! } if($MPCONF['USR']['language'] != '') { |
From: Brian R. <hei...@us...> - 2002-07-27 05:36:02
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv25420/templates/TealMP Modified Files: index.tpl overall_footer.tpl Log Message: Attempt at adding PHP session support in the Auth system. Not exactly working, but at least we'll be able to view the code from the CVS web repo. Removed the 'designed by trevorj' notice on the template, since he's the lead designer and gets enough recognition already. :-P Index: index.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/index.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** index.tpl 26 Jul 2002 09:06:58 -0000 1.4 --- index.tpl 27 Jul 2002 05:35:59 -0000 1.5 *************** *** 28,32 **** <tr> <td> ! Welcome to the home of the phpMP project.<br /><br /> phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> --- 28,32 ---- <tr> <td> ! Welcome to the home of the phpMP project and team!<br /><br /> phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> Index: overall_footer.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/overall_footer.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** overall_footer.tpl 25 Jul 2002 20:50:07 -0000 1.1 --- overall_footer.tpl 27 Jul 2002 05:35:59 -0000 1.2 *************** *** 41,47 **** <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"><a href="http://www.trevorj.com" class="tjcopyright">:: design by trevorj ::</a> - </tr> </table> --- 41,44 ---- |
From: Brian R. <hei...@us...> - 2002-07-27 05:36:02
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv25420/modules Modified Files: user_side.php usercp.php Log Message: Attempt at adding PHP session support in the Auth system. Not exactly working, but at least we'll be able to view the code from the CVS web repo. Removed the 'designed by trevorj' notice on the template, since he's the lead designer and gets enough recognition already. :-P Index: user_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/user_side.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** user_side.php 21 Jul 2002 20:49:40 -0000 1.8 --- user_side.php 27 Jul 2002 05:35:59 -0000 1.9 *************** *** 6,17 **** if($MPCONF['USR']['username'] != "Anonymous") { ! $blockname = "Welcome"; ! $content .= "<font size='1'>Welcome back,<br> " . $MPCONF['USR']['username'] . "!</font><br />"; ! $content .= "<br />"; ! $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/members/profile.php?action=edit'>Edit User Profile</a></font><br />"; if($MPCONF['USR']['isadmin'] == 1) { ! $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/admin/index.php'>Administration Area</a></font>"; } } else { --- 6,19 ---- if($MPCONF['USR']['username'] != "Anonymous") { ! $blockname = "Welcome\n"; ! $content .= "<font size='1'>Welcome back,<br> " . $MPCONF['USR']['username'] . "!</font><br />\n"; ! $content .= "<br />\n"; ! $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/members/profile.php?action=edit'>Edit User Profile</a></font><br />\n"; if($MPCONF['USR']['isadmin'] == 1) { ! $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/admin/index.php'>Administration Area</a></font>\n"; } + + $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/index.php?logout=true'>Logout</a></font>\n"; } else { Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** usercp.php 25 Jul 2002 20:50:07 -0000 1.7 --- usercp.php 27 Jul 2002 05:35:59 -0000 1.8 *************** *** 30,34 **** $this->module_content .= ' <tr>' . "\n"; $this->module_content .= ' <td>' . "\n"; ! $this->module_content .= ' Right now, this is all complete filler. Eventually, the User Control Panel will be contained here. C-ya when it\'s done!' . "\n"; $this->module_content .= ' </td>' . "\n"; $this->module_content .= ' </tr>' . "\n"; --- 30,34 ---- $this->module_content .= ' <tr>' . "\n"; $this->module_content .= ' <td>' . "\n"; ! $this->module_content .= ' Right now, this is all complete filler. Eventually, the User Control Panel will be contained here. C-ya when it\'s done!<br />The time now is ' . time() . ".\n"; $this->module_content .= ' </td>' . "\n"; $this->module_content .= ' </tr>' . "\n"; |
From: Brian R. <hei...@us...> - 2002-07-26 09:07:00
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv7041/templates/TealMP Modified Files: index.tpl Log Message: Updated the index template for our site (will eventually fix that). Added support user-defined language files. This will allow users to choose what language to see everything in (and override the default). Index: index.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/index.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** index.tpl 26 Jul 2002 05:25:07 -0000 1.3 --- index.tpl 26 Jul 2002 09:06:58 -0000 1.4 *************** *** 31,37 **** phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> ! To find out more about phpMP and the goals set for this project, please visit the <a href="{$mpuri}/about.php">page</a>.<br /><br /> ! Also note that his 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. </td> </tr> --- 31,36 ---- phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> ! To find out more about phpMP and the team behind it, visit the <a href="{$mpuri}/about.php">about page</a>.<br /><br /> ! 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 /> </td> </tr> |
From: Brian R. <hei...@us...> - 2002-07-26 09:07:00
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv7041/includes Modified Files: core.php Log Message: Updated the index template for our site (will eventually fix that). Added support user-defined language files. This will allow users to choose what language to see everything in (and override the default). Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** core.php 26 Jul 2002 05:25:06 -0000 1.16 --- core.php 26 Jul 2002 09:06:58 -0000 1.17 *************** *** 97,102 **** $MPCONF['USR'] = $Auth->AuthUser(); ! $default_lang = $MPCONF['TPL']['default_lang']; ! require($MPCONF['GEN']['abs_path'] . '/languages/' . $default_lang . '/lang_main.php'); $Language = new Language(); --- 97,107 ---- $MPCONF['USR'] = $Auth->AuthUser(); ! if($MPCONF['USR']['language'] != '') { ! $use_lang = $MPCONF['USR']['language']; ! } else { ! $use_lang = $MPCONF['TPL']['default_lang']; ! } ! ! require($MPCONF['GEN']['abs_path'] . '/languages/' . $use_lang . '/lang_main.php'); $Language = new Language(); |
From: Brian R. <hei...@us...> - 2002-07-26 05:25:10
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv12041/includes Modified Files: core.php template_ext.php Log Message: Moved language file into a class. Allows for easier access and better modularization. Modified core to allow language prefs to be set before anything can possibly be parsed. Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** core.php 25 Jul 2002 11:06:25 -0000 1.15 --- core.php 26 Jul 2002 05:25:06 -0000 1.16 *************** *** 87,91 **** } ! global $DBA, $Auth, $Template; $DBA = new DBA(); --- 87,91 ---- } ! global $DBA, $Auth, $Template, $Language; $DBA = new DBA(); *************** *** 96,99 **** --- 96,104 ---- $Auth = new Auth(); //Auth not yet written. $MPCONF['USR'] = $Auth->AuthUser(); + + $default_lang = $MPCONF['TPL']['default_lang']; + require($MPCONF['GEN']['abs_path'] . '/languages/' . $default_lang . '/lang_main.php'); + + $Language = new Language(); $Template = new Template(); Index: template_ext.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template_ext.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** template_ext.php 25 Jul 2002 20:50:07 -0000 1.2 --- template_ext.php 26 Jul 2002 05:25:06 -0000 1.3 *************** *** 55,59 **** $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. --- 55,59 ---- $this->config_dir = $MPCONF['GEN']['abs_path'] . '/templates/' . $MPCONF['TPL']['tpl_name'] . '/configs'; $this->cache_dir = ''; ! $this->compile_check = 1; $this->caching = false; //Hopefully we'll get caching working eventually. *************** *** 107,117 **** function assign_language() { // Very, very dirty. Change so that users can choose their language. - - global $MPCONF; - $default_lang = $MPCONF['TPL']['default_lang']; ! require('./languages/' . $default_lang . '/lang_main.php'); ! while (list ($key,$val) = each ($lang) ) { if (!(empty($key))) { $this->assign($key, $val); --- 107,114 ---- function assign_language() { // Very, very dirty. Change so that users can choose their language. ! global $Language; ! while (list ($key,$val) = each ($Language->lang) ) { if (!(empty($key))) { $this->assign($key, $val); |
From: Brian R. <hei...@us...> - 2002-07-26 05:25:10
|
Update of /cvsroot/phpmp/phpMP/languages/english In directory usw-pr-cvs1:/tmp/cvs-serv12041/languages/english Modified Files: lang_main.php Log Message: Moved language file into a class. Allows for easier access and better modularization. Modified core to allow language prefs to be set before anything can possibly be parsed. Index: lang_main.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/languages/english/lang_main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** lang_main.php 25 Jul 2002 20:50:07 -0000 1.1 --- lang_main.php 26 Jul 2002 05:25:07 -0000 1.2 *************** *** 31,48 **** ******************************************************************************/ ! global $MPCONF; ! $lang['l_home'] = 'Home'; ! $lang['l_nav_bar'] = '<a href="' . $MPCONF['GEN']['uri'] . '/index.php">home</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/features.php">features</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/forums/index.php">forums</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/downloads.php">downloads</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/support.php">support</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/about.php">about</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/team.php">team</a> <font color="#0a4a67">•</font> <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/devworld/modules/index.php?action=list">modules</a> <font color="#0a4a67">•</font> <a href="http://www.sourceforge.net/">sourceforge</a>'; ! $lang['l_username'] = 'Username'; ! $lang['l_password'] = 'Password'; ! $lang['l_login'] = 'Login'; ! $lang['l_forgot_passwd'] = 'Forgot Your Password?'; ! $lang['l_register'] = 'Register A Username'; ! $lang['l_not_logged_in'] = 'You are not logged in.'; ! $lang['l_powered_by'] = 'powered by phpMP ' . $MPCONF['GEN']['version'] . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.'; ! $lang['l_copyright'] = 'All content is property of its respective owner. All rights reserved.'; ?> --- 31,58 ---- ******************************************************************************/ ! class Language { ! var $lang; ! ! function Language() { ! global $MPCONF; ! $this->lang['l_home'] = 'Home'; ! $this->lang['l_nav_bar'] = '<a href="' . $MPCONF['GEN']['uri'] . '/index.php">home</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/features.php">features</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/forums/index.php">forums</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/downloads.php">downloads</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/support.php">support</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/about.php">about</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/team.php">team</a> <font color="#0a4a67">•</font> <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/devworld/modules/index.php?action=list">modules</a> <font color="#0a4a67">•</font> <a href="http://www.sourceforge.net/">sourceforge</a>'; ! ! $this->lang['l_username'] = 'Username'; ! $this->lang['l_password'] = 'Password'; ! $this->lang['l_login'] = 'Login'; ! $this->lang['l_forgot_passwd'] = 'Forgot Your Password?'; ! $this->lang['l_register'] = 'Register A Username'; ! $this->lang['l_not_logged_in'] = 'You are not logged in.'; ! ! $this->lang['l_powered_by'] = 'powered by phpMP ' . $MPCONF['GEN']['version'] . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.'; ! $this->lang['l_copyright'] = 'All content is property of its respective owner. All rights reserved.'; ! ! } ! ! } ?> |
From: Brian R. <hei...@us...> - 2002-07-26 05:25:10
|
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv12041/templates/TealMP Modified Files: index.tpl Log Message: Moved language file into a class. Allows for easier access and better modularization. Modified core to allow language prefs to be set before anything can possibly be parsed. Index: index.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/index.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** index.tpl 25 Jul 2002 20:50:07 -0000 1.2 --- index.tpl 26 Jul 2002 05:25:07 -0000 1.3 *************** *** 28,33 **** <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> --- 28,37 ---- <tr> <td> ! Welcome to the home of the phpMP project.<br /><br /> ! phpMP is (another) portal project, similar to the likes of PHPNuke, PostNuke, and many others. What sets apart phpMP is that, instead of focusing on the wants and desires of the people creating the portal, the phpMP team is doing whatever possible to ensure that all users will see a reason to use this software.<br /><br /> ! Instead of just providing article management and news posting functionality, phpMP is fully modular and customizable. If, for example, you dislike our news script, simply drop in your own or another written by someone else. Think the administration panel needs a few extra features? Simply drop in a souped-up version written by another user.<br /><br /> ! To find out more about phpMP and the goals set for this project, please visit the <a href="{$mpuri}/about.php">page</a>.<br /><br /> ! Also note that his 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. </td> </tr> |
Update of /cvsroot/phpmp/phpMP/templates/TealMP In directory usw-pr-cvs1:/tmp/cvs-serv26475/templates/TealMP Modified Files: index.tpl Added Files: block_left.tpl block_right.tpl modules.tpl overall_footer.tpl overall_header.tpl Removed Files: block.tpl box.tpl Log Message: Fully integrated Smarty (finally). Blocks now work (and quite well, too). Went ahead and split header and fotter from main template, plus added the module template. --- NEW FILE: block_left.tpl --- <td valign="top" width="150"> {foreach from=$left_side item=item key=key} <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>{$key}</small></font> </td></tr></table> </td> </tr> <tr> <td> <table width="100%" class="tableborder" bordercolor=black><tr><td> {$item} </td></tr></table> </td> </tr> </table> {/foreach} </td> --- NEW FILE: block_right.tpl --- <td valign="top" width="150"> {foreach from=$right_side item=item key=key} <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>{$key}</small></font> </td></tr></table> </td> </tr> <tr> <td> <table width="100%" class="tableborder" bordercolor=black><tr><td> {$item} </td></tr></table> </td> </tr> </table> {/foreach} </td> --- NEW FILE: modules.tpl --- {* phpMP Template - TealMP - modules.tpl *} {include file=overall_header.tpl} <table width="100%" bgcolor="#9fc2c6" cellspacing="0" cellpadding="2"> <tr> {include file=block_left.tpl} <td valign="top"> {$module_content} </td> {include file=block_right.tpl} {include file=overall_footer.tpl} --- NEW FILE: overall_footer.tpl --- <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"> {$l_nav_bar} </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" bordercolor=black 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"> <tr> <td width="100" align="left" background="{$mpuri}/templates/{$tpl_name}/images/footer_left.gif"></td> <td width="*" align="center"><font size="-2">{$l_powered_by}<br />{$l_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"><a href="http://www.trevorj.com" class="tjcopyright">:: design by trevorj ::</a> </tr> </table> </td> </tr> </td> </tr> </table> </body> </html> --- NEW FILE: overall_header.tpl --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>.:: {$site_name} :: {$l_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"> {$l_nav_bar} </font> </td> </tr> <tr> <td width="100%" bgcolor=black colspan="5"><img src="{$mpuri}/templates/{$tpl_name}/images/pixel.gif" /></td> </tr> </table> Index: index.tpl =================================================================== RCS file: /cvsroot/phpmp/phpMP/templates/TealMP/index.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** index.tpl 25 Jul 2002 11:06:26 -0000 1.1 --- index.tpl 25 Jul 2002 20:50:07 -0000 1.2 *************** *** 1,30 **** ! <!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"> --- 1,5 ---- ! {* phpMP Template - TealMP - index.tpl *} ! {include file=overall_header.tpl} <table width="100%" bgcolor="#9fc2c6" cellspacing="0" cellpadding="2"> *************** *** 32,36 **** ! {* include file=box.tpl *} --- 7,11 ---- ! {include file=block_left.tpl} *************** *** 42,46 **** <tr> <td width="100%" class="tabletitle" bordercolor=black> ! <font color=white><small>.:: {$site_name} :: Home ::.</small></font> </td> </tr> --- 17,21 ---- <tr> <td width="100%" class="tabletitle" bordercolor=black> ! <font color=white><small>.:: {$site_name} :: {$l_home} ::.</small></font> </td> </tr> *************** *** 64,126 **** ! {* 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> \ No newline at end of file --- 39,43 ---- ! {include file=block_right.tpl} ! {include file=overall_footer.tpl} \ No newline at end of file --- block.tpl DELETED --- --- box.tpl DELETED --- |
From: Brian R. <hei...@us...> - 2002-07-25 20:50:11
|
Update of /cvsroot/phpmp/phpMP/languages/english In directory usw-pr-cvs1:/tmp/cvs-serv26475/languages/english Added Files: lang_main.php Log Message: Fully integrated Smarty (finally). Blocks now work (and quite well, too). Went ahead and split header and fotter from main template, plus added the module template. --- NEW FILE: lang_main.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: /languages/english/lang_main.php Usage & Function: Main English Language File Create Date: July 25, 2002 $Id: lang_main.php,v 1.1 2002/07/25 20:50:07 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. ******************************************************************************* ******************************************************************************/ global $MPCONF; $lang['l_home'] = 'Home'; $lang['l_nav_bar'] = '<a href="' . $MPCONF['GEN']['uri'] . '/index.php">home</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/features.php">features</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/forums/index.php">forums</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/downloads.php">downloads</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/support.php">support</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/about.php">about</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/team.php">team</a> <font color="#0a4a67">•</font> <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmp/phpMP/">cvs</a> <font color="#0a4a67">•</font> <a href="' . $MPCONF['GEN']['uri'] . '/devworld/modules/index.php?action=list">modules</a> <font color="#0a4a67">•</font> <a href="http://www.sourceforge.net/">sourceforge</a>'; $lang['l_username'] = 'Username'; $lang['l_password'] = 'Password'; $lang['l_login'] = 'Login'; $lang['l_forgot_passwd'] = 'Forgot Your Password?'; $lang['l_register'] = 'Register A Username'; $lang['l_not_logged_in'] = 'You are not logged in.'; $lang['l_powered_by'] = 'powered by phpMP ' . $MPCONF['GEN']['version'] . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.'; $lang['l_copyright'] = 'All content is property of its respective owner. All rights reserved.'; ?> |
From: Brian R. <hei...@us...> - 2002-07-25 20:50:11
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv26475/modules Modified Files: usercp.php Log Message: Fully integrated Smarty (finally). Blocks now work (and quite well, too). Went ahead and split header and fotter from main template, plus added the module template. Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** usercp.php 21 Jul 2002 21:43:33 -0000 1.6 --- usercp.php 25 Jul 2002 20:50:07 -0000 1.7 *************** *** 4,21 **** class Module { ! ! var $pagetitle; 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"; - $Template->Blocking('EndBig'); } } --- 4,41 ---- class Module { ! ! var $module_content; function Init() { } function MakeContent() { ! global $MPCONF; ! $this->module_content .= '<table width="100%" cellspacing="0" cellpadding="0">' . "\n"; ! $this->module_content .= ' <tr>' . "\n"; ! $this->module_content .= ' <td height="20" class="tabletitle">' . "\n"; ! $this->module_content .= " <table width=\"100%\" class=\"tabletitle\" bordercolor=\"black\" background=\"{$MPCONF['TPL']['uri']}/templates/{$MPCONF['TPL']['tpl_name']}/images/navbg.gif\">" . "\n"; ! $this->module_content .= ' <tr>' . "\n"; ! $this->module_content .= ' <td width="100%" class="tabletitle" bordercolor=black>' . "\n"; ! $this->module_content .= " <font color=white><small>.:: {$MPCONF['TPL']['sitename']} :: User Control Panel ::.</small></font>" . "\n"; ! $this->module_content .= ' </td>' . "\n"; ! $this->module_content .= ' </tr>' . "\n"; ! $this->module_content .= ' </table>' . "\n"; ! $this->module_content .= ' </td>' . "\n"; ! $this->module_content .= ' </tr>' . "\n"; ! $this->module_content .= ' <tr>' . "\n"; ! $this->module_content .= ' <td>' . "\n"; ! $this->module_content .= ' <table width="100%" class="tableborder" bordercolor=black>' . "\n"; ! $this->module_content .= ' <tr>' . "\n"; ! $this->module_content .= ' <td>' . "\n"; ! $this->module_content .= ' Right now, this is all complete filler. Eventually, the User Control Panel will be contained here. C-ya when it\'s done!' . "\n"; ! $this->module_content .= ' </td>' . "\n"; ! $this->module_content .= ' </tr>' . "\n"; ! $this->module_content .= ' </table>' . "\n"; ! $this->module_content .= ' </td>' . "\n"; ! $this->module_content .= ' </tr>' . "\n"; ! $this->module_content .= '</table>' . "\n"; } } |
From: Brian R. <hei...@us...> - 2002-07-25 20:50:10
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv26475/includes Modified Files: constants.php template_ext.php Log Message: Fully integrated Smarty (finally). Blocks now work (and quite well, too). Went ahead and split header and fotter from main template, plus added the module template. Index: constants.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/constants.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** constants.php 25 Jul 2002 06:16:22 -0000 1.5 --- constants.php 25 Jul 2002 20:50:07 -0000 1.6 *************** *** 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."; - ?> --- 1,3 ---- Index: template_ext.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template_ext.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** template_ext.php 25 Jul 2002 11:06:25 -0000 1.1 --- template_ext.php 25 Jul 2002 20:50:07 -0000 1.2 *************** *** 43,47 **** class Template extends Smarty { ! var $TPLVars; function Template() { --- 43,48 ---- class Template extends Smarty { ! var $right_side; ! var $left_side; function Template() { *************** *** 76,81 **** $content = $data_array['content']; } ! $this->TPLVars["$side"][$i]['name'] = $blockname; ! $this->TPLVars["$side"][$i]['content'] = $content; $i++; --- 77,86 ---- $content = $data_array['content']; } ! ! if($side == 'left') { ! $this->left_side["$blockname"] = $content; ! } elseif($side == 'right') { ! $this->right_side["$blockname"] = $content; ! } $i++; *************** *** 85,89 **** function assign_defaults() { ! global $MPCONF, $DBA; $this->assign( array( --- 90,94 ---- function assign_defaults() { ! global $MPCONF; $this->assign( array( *************** *** 94,100 **** "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'], ) ); --- 99,103 ---- "date" => date('l, F jS, Y'), "tpl_name" => $MPCONF['TPL']['tpl_name'], ! "site_name" => $MPCONF['TPL']['sitename'] ) ); *************** *** 102,105 **** --- 105,124 ---- } + function assign_language() { + // Very, very dirty. Change so that users can choose their language. + + global $MPCONF; + $default_lang = $MPCONF['TPL']['default_lang']; + + require('./languages/' . $default_lang . '/lang_main.php'); + + while (list ($key,$val) = each ($lang) ) { + if (!(empty($key))) { + $this->assign($key, $val); + } + } + + } + function display_template($temp_name) { global $DBA, $Debug; *************** *** 110,119 **** $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"); } --- 129,141 ---- $this->assign_defaults(); + $this->assign_language(); + $Debug->endTimer(); $this->assign("debug_info","debug mode :: " . $DBA->stats['query_count'] . " queries executed :: executed in " . $Debug->totaltime . " seconds"); ! $this->assign( "left_side", $this->left_side ); ! $this->assign( "right_side", $this->right_side ); ! $this->display($temp_name); } |
From: Brian R. <hei...@us...> - 2002-07-25 20:50:10
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv26475 Modified Files: index.php modules.php Log Message: Fully integrated Smarty (finally). Blocks now work (and quite well, too). Went ahead and split header and fotter from main template, plus added the module template. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** index.php 25 Jul 2002 11:06:25 -0000 1.17 --- index.php 25 Jul 2002 20:50:07 -0000 1.18 *************** *** 48,52 **** $PHPMP->Init(); ! $Template->display_template('index'); ?> --- 48,52 ---- $PHPMP->Init(); ! $Template->display_template('index.tpl'); ?> Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** modules.php 25 Jul 2002 06:16:22 -0000 1.8 --- modules.php 25 Jul 2002 20:50:07 -0000 1.9 *************** *** 94,106 **** $Module->Init(); - $my_page_title = $Module->pagetitle; } - $Template->PrintHeader( array(PAGETITLE => $my_page_title) ); - - $Template->CreateSide('left'); - - $Template->Blocking('BeginMain'); - if($ModCheck != 0) { $Module->MakeContent(); --- 94,99 ---- *************** *** 111,119 **** } ! $Template->Blocking('EndMain'); ! ! $Template->CreateSide('right'); ! $Template->PrintFooter( array() ); ?> --- 104,110 ---- } ! $Template->assign( 'module_content', $Module->module_content ); ! $Template->display_template('modules.tpl'); ?> |
From: Brian R. <hei...@us...> - 2002-07-25 20:44:49
|
Update of /cvsroot/phpmp/phpMP/languages/english In directory usw-pr-cvs1:/tmp/cvs-serv25143/english Log Message: Directory /cvsroot/phpmp/phpMP/languages/english added to the repository |
From: Brian R. <hei...@us...> - 2002-07-25 20:44:38
|
Update of /cvsroot/phpmp/phpMP/languages In directory usw-pr-cvs1:/tmp/cvs-serv25066/languages Log Message: Directory /cvsroot/phpmp/phpMP/languages added to the repository |