You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(193) |
Nov
(393) |
Dec
(347) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(401) |
Feb
(232) |
Mar
(343) |
Apr
(129) |
May
(129) |
Jun
(116) |
Jul
(189) |
Aug
(129) |
Sep
(68) |
Oct
(172) |
Nov
(298) |
Dec
(148) |
| 2003 |
Jan
(264) |
Feb
(210) |
Mar
(322) |
Apr
(309) |
May
(234) |
Jun
(188) |
Jul
(215) |
Aug
(161) |
Sep
(234) |
Oct
(163) |
Nov
(110) |
Dec
(7) |
| 2004 |
Jan
(95) |
Feb
(107) |
Mar
(55) |
Apr
(3) |
May
(49) |
Jun
(35) |
Jul
(57) |
Aug
(43) |
Sep
(56) |
Oct
(40) |
Nov
(25) |
Dec
(21) |
| 2005 |
Jan
(93) |
Feb
(25) |
Mar
(22) |
Apr
(72) |
May
(45) |
Jun
(24) |
Jul
(29) |
Aug
(20) |
Sep
(50) |
Oct
(93) |
Nov
(69) |
Dec
(183) |
| 2006 |
Jan
(185) |
Feb
(143) |
Mar
(402) |
Apr
(260) |
May
(322) |
Jun
(367) |
Jul
(234) |
Aug
(299) |
Sep
(206) |
Oct
(288) |
Nov
(338) |
Dec
(307) |
| 2007 |
Jan
(296) |
Feb
(250) |
Mar
(261) |
Apr
(434) |
May
(539) |
Jun
(274) |
Jul
(440) |
Aug
(190) |
Sep
(128) |
Oct
(249) |
Nov
(86) |
Dec
(51) |
| 2008 |
Jan
(177) |
Feb
(67) |
Mar
(61) |
Apr
(48) |
May
(56) |
Jun
(97) |
Jul
(60) |
Aug
(64) |
Sep
(151) |
Oct
(79) |
Nov
(109) |
Dec
(123) |
| 2009 |
Jan
(70) |
Feb
(70) |
Mar
(73) |
Apr
(80) |
May
(22) |
Jun
(193) |
Jul
(191) |
Aug
(181) |
Sep
(120) |
Oct
(48) |
Nov
(24) |
Dec
|
|
From: Jonathan H. <the...@us...> - 2001-11-01 19:37:50
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv21150
Modified Files:
admin_smilies.php
Log Message:
Quick BugFix
Index: admin_smilies.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_smilies.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** admin_smilies.php 2001/10/14 15:46:53 1.9
--- admin_smilies.php 2001/11/01 19:37:47 1.10
***************
*** 151,155 ****
"L_RESET" => $lang['Reset_changes'],
! "SMILEY_IMG" => $phpbb_root_path . '/' . $board_config['smilies_path'] . '/' . $smiley_edit_img,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
--- 151,155 ----
"L_RESET" => $lang['Reset_changes'],
! "SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smiley_edit_img,
"S_SMILEY_ACTION" => append_sid("admin_smilies.$phpEx"),
***************
*** 341,343 ****
include('page_footer_admin.'.$phpEx);
! ?>
\ No newline at end of file
--- 341,343 ----
include('page_footer_admin.'.$phpEx);
! ?>
|
|
From: James A. <th...@us...> - 2001-11-01 10:43:32
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv23860
Modified Files:
install.php
Log Message:
Ok, this gets all the area it needs..heh
Index: install.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/install.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** install.php 2001/11/01 10:42:06 1.10
--- install.php 2001/11/01 10:43:30 1.11
***************
*** 213,220 ****
header("Content-disposition: attachment; filename=config.php");
! if( get_magic_quotes_gpc() )
! {
! $HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']);
! }
echo $HTTP_POST_VARS['config_data'];
--- 213,222 ----
header("Content-disposition: attachment; filename=config.php");
! //
! // We need to stripslashes no matter what the setting of magic_quotes_gpc is
! // because we add slahes at the top if its off, and they are added automaticlly
! // if it is on.
! //
! $HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']);
echo $HTTP_POST_VARS['config_data'];
***************
*** 227,234 ****
// Ok we couldn't write the config file so let's try ftping it.
//
! if ( get_magic_quotes_gpc() )
! {
! $HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']);
! }
$s_hidden_fields = '<input type="hidden" name="config_data" value="'.htmlspecialchars($HTTP_POST_VARS['config_data']).'" />';
$s_hidden_fields .= '<input type="hidden" name="ftp_file" value="1" />';
--- 229,235 ----
// Ok we couldn't write the config file so let's try ftping it.
//
!
! $HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']);
!
$s_hidden_fields = '<input type="hidden" name="config_data" value="'.htmlspecialchars($HTTP_POST_VARS['config_data']).'" />';
$s_hidden_fields .= '<input type="hidden" name="ftp_file" value="1" />';
***************
*** 252,259 ****
//
// Here we'll actually send the file...
- //
- // We need to stripslashes no matter what the setting of magic_quotes_gpc is
- // because we add slahes at the top if its off, and they are added automaticlly
- // if it is on.
//
$HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']);
--- 253,256 ----
|
|
From: James A. <th...@us...> - 2001-11-01 10:42:09
|
Update of /cvsroot/phpbb/phpBB2 In directory usw-pr-cvs1:/tmp/cvs-serv23493 Modified Files: install.php Log Message: Fixed little bug that would leave slashes in the config file if magic_quotes_gpc was off See this topic for more info: http://area51.phpbb.com/phpBB2/viewtopic.php?p=9797#9797 Index: install.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/install.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** install.php 2001/10/18 14:56:40 1.9 --- install.php 2001/11/01 10:42:06 1.10 *************** *** 253,260 **** // Here we'll actually send the file... // ! if ( get_magic_quotes_gpc() ) ! { ! $HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']); ! } $conn_id = ftp_connect('localhost'); $login_result = ftp_login($conn_id, "$ftp_user", "$ftp_pass"); --- 253,262 ---- // Here we'll actually send the file... // ! // We need to stripslashes no matter what the setting of magic_quotes_gpc is ! // because we add slahes at the top if its off, and they are added automaticlly ! // if it is on. ! // ! $HTTP_POST_VARS['config_data'] = stripslashes($HTTP_POST_VARS['config_data']); ! $conn_id = ftp_connect('localhost'); $login_result = ftp_login($conn_id, "$ftp_user", "$ftp_pass"); |
|
From: James A. <th...@us...> - 2001-10-30 23:44:42
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv13676/admin
Modified Files:
admin_forums.php admin_groups.php
Log Message:
Fixed bug #474123
Index: admin_forums.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_forums.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** admin_forums.php 2001/10/16 01:00:47 1.24
--- admin_forums.php 2001/10/30 23:44:39 1.25
***************
*** 214,218 ****
{
list($cat_id) = each($HTTP_POST_VARS['addforum']);
! $forumname = $HTTP_POST_VARS['forumname'][$cat_id];
}
}
--- 214,221 ----
{
list($cat_id) = each($HTTP_POST_VARS['addforum']);
! //
! // stripslashes needs to be run on this because slashes are added when the forum name is posted
! //
! $forumname = stripslashes($HTTP_POST_VARS['forumname'][$cat_id]);
}
}
Index: admin_groups.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_groups.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** admin_groups.php 2001/10/15 00:38:30 1.11
--- admin_groups.php 2001/10/30 23:44:39 1.12
***************
*** 165,171 ****
else
{
! $group_type = isset($HTTP_POST_VARS['group_type']) ? trim(addslashes($HTTP_POST_VARS['group_type'])) : "";
! $group_name = isset($HTTP_POST_VARS['group_name']) ? trim(addslashes($HTTP_POST_VARS['group_name'])) : "";
! $group_description = isset($HTTP_POST_VARS['group_description']) ? trim(addslashes($HTTP_POST_VARS['group_description'])) : "";
$group_moderator = isset($HTTP_POST_VARS['group_moderator']) ? intval($HTTP_POST_VARS['group_moderator']) : "";
$delete_old_moderator = isset($HTTP_POST_VARS['delete_old_moderator']) ? intval($HTTP_POST_VARS['delete_old_moderator']) : "";
--- 165,171 ----
else
{
! $group_type = isset($HTTP_POST_VARS['group_type']) ? trim($HTTP_POST_VARS['group_type']) : "";
! $group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : "";
! $group_description = isset($HTTP_POST_VARS['group_description']) ? trim($HTTP_POST_VARS['group_description']) : "";
$group_moderator = isset($HTTP_POST_VARS['group_moderator']) ? intval($HTTP_POST_VARS['group_moderator']) : "";
$delete_old_moderator = isset($HTTP_POST_VARS['delete_old_moderator']) ? intval($HTTP_POST_VARS['delete_old_moderator']) : "";
|
|
From: Bart v. B. <ba...@us...> - 2001-10-26 23:26:57
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv11712
Modified Files:
upgrade.php
Log Message:
Able to convert moderators
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/upgrade.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** upgrade.php 2001/10/22 21:26:27 1.1
--- upgrade.php 2001/10/26 23:26:54 1.2
***************
*** 525,531 ****
'user_msnm');
! lock_tables(1, USERS_TABLE);
while($row = mysql_fetch_array($result))
{
if(is_int($row['user_regdate']))
{
--- 525,544 ----
'user_msnm');
! lock_tables(1, array(USERS_TABLE, GROUPS_TABLE, USER_GROUP_TABLE));
while($row = mysql_fetch_array($result))
{
+ $sql = "INSERT INTO ".GROUPS_TABLE." (group_name, group_description, group_single_user) VALUES ('".addslashes($row['username'])."', 'Personal User', 1)";
+ query($sql, "Wasn't able to insert user ".$row['user_id']." into table ".GROUPS_TABLE);
+ $group_id = mysql_insert_id();
+ if($group_id != 0)
+ {
+ $sql = "INSERT INTO ".USER_GROUP_TABLE." (group_id, user_id, user_pending) VALUES ($group_id, ".$row['user_id'].", 0)";
+ query($sql, "Wasn't able to insert user ".$row['user_id']." into table ".USER_GROUP_TABLE);
+ }
+ else
+ {
+ print "Couldn't get insert ID for ".GROUPS_TABLE." table<br>\n";
+ }
+
if(is_int($row['user_regdate']))
{
***************
*** 601,605 ****
user_aim = '".$row['user_aim']."',
user_yim = '".$row['user_yim']."',
! user_msnm = '".$row['user_msnm']."'
WHERE user_id = ".$row['user_id'];
query($sql, "Couldn't update ".USERS_TABLE." table with new BBcode and regdate for user_id ".$row['user_id']);
--- 614,619 ----
user_aim = '".$row['user_aim']."',
user_yim = '".$row['user_yim']."',
! user_msnm = '".$row['user_msnm']."',
! user_level = '".$row['user_userlevel']."'
WHERE user_id = ".$row['user_id'];
query($sql, "Couldn't update ".USERS_TABLE." table with new BBcode and regdate for user_id ".$row['user_id']);
***************
*** 789,792 ****
--- 803,845 ----
}
lock_tables(0);
+ end_step('convert_mods');
+
+ case 'convert_mods';
+ echo "<h3>Converting moderator table</h3>";
+ $sql = "SELECT * FROM forum_mods";
+ $result = query($sql, "Couldn't get list with all forum moderators");
+ while($row = mysql_fetch_array($result))
+ {
+ // Check if this moderator and this forum still exist
+ $sql = "SELECT NULL from ".USERS_TABLE.", ".FORUMS_TABLE." WHERE user_id = ".$row['user_id']." AND forum_id = ".$row['forum_id'];
+ $check_data = query($sql, "Couldn't check if user ".$row['user_id']." and forum ".$row['forum_id']." exist");
+ if(mysql_numrows($check_data) == 0)
+ {
+ // Either the moderator or the forum have been deleted, this line in forum_mods was redundant, skip it.
+ continue;
+ }
+
+ $sql = "
+ SELECT
+ g.group_id
+ FROM ".
+ GROUPS_TABLE." g, ".
+ USER_GROUP_TABLE." ug
+ WHERE
+ g.group_id=ug.group_id
+ AND ug.user_id = ".$row['user_id']."
+ AND g.group_single_user = 1
+ ";
+ $insert_group = query($sql, "Couldn't get group number for user ".$row['user_id'].".");
+ $group_id = mysql_fetch_array($insert_group);
+ $group_id = $group_id['group_id'];
+
+ $sql = "INSERT INTO ".AUTH_ACCESS_TABLE." (group_id, forum_id, auth_mod) VALUES ($group_id, ".$row['forum_id'].", 1)";
+ query($sql, "Couldn't set moderator (user_id = ".$row['user_id'].") for forum ".$row['forum_id'].".");
+ }
+
+
+
+
end_step('update_schema');
|
|
From: Jonathan H. <the...@us...> - 2001-10-26 15:48:51
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv19556 Modified Files: lang_main.php Log Message: Readded ftp stuff for install Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** lang_main.php 2001/10/25 23:21:11 1.16 --- lang_main.php 2001/10/26 15:48:48 1.17 *************** *** 1067,1072 **** $lang['Unwriteable_config'] = "Your config file is unwriteable at present. A copy of the config file will be downloaded to your when you click the button below. You should upload this file to the same directory as phpBB 2. Once this is done you should log in using the administrator name and password you provided on the previous form and visit the admin control centre (a link will appear at the bottom of each screen once logged in) to check the general configuration. Thank you for choosing phpBB 2."; $lang['Download_config'] = "Download Config"; - // // Ranks admin --- 1067,1082 ---- $lang['Unwriteable_config'] = "Your config file is unwriteable at present. A copy of the config file will be downloaded to your when you click the button below. You should upload this file to the same directory as phpBB 2. Once this is done you should log in using the administrator name and password you provided on the previous form and visit the admin control centre (a link will appear at the bottom of each screen once logged in) to check the general configuration. Thank you for choosing phpBB 2."; $lang['Download_config'] = "Download Config"; + $lang['ftp_choose'] = "Choose Download Method"; + $lang['Attempt_ftp'] = "Attempt to ftp config file into place:"; + $lang['Send_file'] = "Just send the file to me and I'll ftp it manually:"; + $lang['ftp_option'] = "<br />Since the ftp extensions are loaded in php you may will also be given + the option of first trying to automatically ftp the config file into place."; + $lang['ftp_instructs'] = "You have chosen to attempt to ftp the file to your phpBB installation automagically. Please enter the information below to facilitate this process. Note that the FTP Path should be the exact path via ftp to your phpBB2 installation as if you were ftping to it."; + $lang['ftp_path'] = "FTP Path to phpBB2:"; + $lang['ftp_username'] = "Your FTP Username:"; + $lang['ftp_password'] = "Your FTP Password:"; + $lang['Transfer_config'] = "Start Transfer"; + $lang['ftp_info'] = "Enter Your FTP Information"; // // Ranks admin *************** *** 1126,1128 **** // ------------------------------------------------- ! ?> \ No newline at end of file --- 1136,1138 ---- // ------------------------------------------------- ! ?> |
|
From: Paul S. O. <ps...@us...> - 2001-10-26 01:09:11
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv6422
Modified Files:
viewtopic.php
Log Message:
Ooops, forgot to clear edited by output for subsequent posts
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -r1.125 -r1.126
*** viewtopic.php 2001/10/25 23:21:11 1.125
--- viewtopic.php 2001/10/26 01:09:08 1.126
***************
*** 934,937 ****
--- 934,941 ----
$l_edited_by = "<br /><br />" . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
}
+ else
+ {
+ $l_edited_by = "";
+ }
//
|
|
From: Paul S. O. <ps...@us...> - 2001-10-25 23:21:15
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv20465/templates/subSilver
Modified Files:
index_body.tpl viewforum_body.tpl viewtopic_body.tpl
Log Message:
Altered various language constructs + new quote changes for PM + altered pagination
Index: index_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/index_body.tpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** index_body.tpl 2001/10/14 18:22:32 1.5
--- index_body.tpl 2001/10/25 23:21:12 1.6
***************
*** 7,10 ****
--- 7,11 ----
</tr>
</table>
+
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
***************
*** 32,35 ****
--- 33,37 ----
<!-- END catrow -->
</table>
+
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
<tr>
***************
*** 38,41 ****
--- 40,44 ----
</tr>
</table>
+
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
***************
*** 45,61 ****
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%">
! <p><span class="gensmall">A total of <b>{TOTAL_POSTS}</b> posts have been
! made.<br />
! We have <b>{TOTAL_USERS}</b> registered users.<br />
! Welcome to our newest member <b><a href="{U_NEWEST_USER_PROFILE}">{NEWEST_USER}</a></b>.</span></p>
</td>
</tr>
<tr>
! <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}.<br />
{LOGGED_IN_USER_LIST}</span></td>
</tr>
</table>
! <!-- BEGIN user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
--- 48,61 ----
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%">
! <p><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span></p>
</td>
</tr>
<tr>
! <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}<br />
{LOGGED_IN_USER_LIST}</span></td>
</tr>
</table>
! <!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
***************
*** 76,92 ****
</table>
</form>
! <!-- END user_logged_out -->
! <br />
<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_new.gif" alt="{L_NEWPOSTS}"/></td>
! <td class="gensmall"><span class="gensmall">{L_NEWPOSTS}</span></td>
<td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder.gif" alt="{L_NONEWPOSTS}" /></td>
! <td class="gensmall">{L_NONEWPOSTS}</td>
<td> </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" /></td>
<td class="gensmall">{L_FORUM_LOCKED}</td>
</tr>
! </table>
\ No newline at end of file
--- 76,93 ----
</table>
</form>
! <!-- END switch_user_logged_out -->
! <br clear="all" />
!
<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_new.gif" alt="{L_NEW_POSTS}"/></td>
! <td class="gensmall"><span class="gensmall">{L_NEW_POSTS}</span></td>
<td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder.gif" alt="{L_NO_NEW_POSTS}" /></td>
! <td class="gensmall">{L_NO_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" /></td>
<td class="gensmall">{L_FORUM_LOCKED}</td>
</tr>
! </table>
Index: viewforum_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/viewforum_body.tpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** viewforum_body.tpl 2001/10/16 16:24:51 1.6
--- viewforum_body.tpl 2001/10/25 23:21:12 1.7
***************
*** 14,17 ****
--- 14,18 ----
</tr>
</table>
+
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
***************
*** 28,32 ****
{topicrow.GOTO_PAGE}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
! <td class="row3" align="center" valign="middle"><span class="name"><a href="{topicrow.U_TOPIC_POSTER_PROFILE}" class="name">{topicrow.TOPIC_POSTER}</a></span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST}</span></td>
--- 29,33 ----
{topicrow.GOTO_PAGE}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
! <td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_POSTER}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST}</span></td>
***************
*** 44,58 ****
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{IMG_POST}" border="0" alt="{L_NEW_TOPIC}" width="82" height="25" /></a></td>
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{SITENAME} {L_INDEX}</a> -> {FORUM_NAME}</span></td>
! <td align="right" valign="top" nowrap="nowrap"><span class="nav">{L_PAGE}
! <b>{ON_PAGE}</b> {L_OF} <b>{TOTAL_PAGES}</b> :: {PAGINATION}</span>
! <span class="gensmall"><br />
! {S_TIMEZONE}</span></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
--- 45,62 ----
</tr>
</table>
+
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{IMG_POST}" border="0" alt="{L_NEW_TOPIC}" width="82" height="25" /></a></td>
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{SITENAME} {L_INDEX}</a> -> {FORUM_NAME}</span></td>
! <td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
! </td>
</tr>
+ <tr>
+ <td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
+ </tr>
</table>
</form>
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
***************
*** 60,94 ****
</tr>
</table>
! <table cellspacing="3" border="0" align="center" cellpadding="0">
! <tr>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_new.gif" alt="{L_NEWPOSTS}" width="19" height="18" /></td>
! <td class="gensmall">New posts</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder.gif" alt="{L_NONEWPOSTS}" width="19" height="18" /></td>
! <td class="gensmall">Old topic</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_announce.gif" alt="No new posts" width="19" height="18" /></td>
! <td class="gensmall">Announcement</td>
! <td class="gensmall"> </td>
! <td class="gensmall"><img src="templates/subSilver/images/folder_lock.gif" alt="{L_NEWPOSTS}" width="19" height="18" /></td>
! <td class="gensmall">Topic is locked</td>
! </tr>
! <tr>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_new_hot.gif" alt="{L_NEWPOSTS}" width="19" height="18" /></td>
! <td class="gensmall">New hot topic</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_hot.gif" alt="{L_NEWPOSTS}" width="19" height="18" /></td>
! <td class="gensmall">Hot topic</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_sticky.gif" alt="No new posts" width="19" height="18" /></td>
! <td class="gensmall">Sticky post</td>
! <td class="gensmall"> </td>
! <td class="gensmall"> </td>
! <td class="gensmall"> </td>
! </tr>
! </table>
! <table width="100%" border="0" cellspacing="0" cellpadding="0">
! <tr>
<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
- </tr>
</table>
--- 64,95 ----
</tr>
</table>
!
! <table width="100%" cellspacing="0" border="0" align="center" cellpadding="0">
! <tr>
! <td align="left" valign="top"><table cellspacing="3" cellpadding="0" border="0">
! <tr>
! <td width="20" align="left"><img src="templates/subSilver/images/folder_new.gif" alt="{L_NEW_POSTS}" width="19" height="18" /></td>
! <td class="gensmall">{L_NEW_POSTS}</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder.gif" alt="{L_NO_NEW_POSTS}" width="19" height="18" /></td>
! <td class="gensmall">{L_NO_NEW_POSTS}</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_announce.gif" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
! <td class="gensmall">{L_ANNOUNCEMENT}</td>
! <td> </td>
! <td class="gensmall"><img src="templates/subSilver/images/folder_lock.gif" alt="{L_TOPIC_IS_LOCKED}" width="19" height="18" /></td>
! <td class="gensmall">{L_TOPIC_IS_LOCKED}</td>
! </tr>
! <tr>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_new_hot.gif" alt="{L_NEW_POSTS_HOT}" width="19" height="18" /></td>
! <td class="gensmall">{L_NEW_POSTS_HOT}</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_hot.gif" alt="{L_NO_NEW_POSTS_HOT}" width="19" height="18" /></td>
! <td class="gensmall">{L_NO_NEW_POSTS_HOT}</td>
! <td> </td>
! <td width="20" align="center"><img src="templates/subSilver/images/folder_sticky.gif" alt="{L_STICKY}" width="19" height="18" /></td>
! <td class="gensmall">{L_STICKY}</td>
! </tr>
! </table></td>
<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
</table>
Index: viewtopic_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/viewtopic_body.tpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** viewtopic_body.tpl 2001/10/11 20:06:46 1.6
--- viewtopic_body.tpl 2001/10/25 23:21:12 1.7
***************
*** 40,45 ****
{postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}:
{postrow.POST_SUBJECT}</span></td>
! <td nowrap="nowrap" valign="top" align="right">{postrow.IP_IMG} {postrow.QUOTE_IMG}
! {postrow.EDIT_IMG} {postrow.DELETE_IMG}</td>
</tr>
<tr>
--- 40,45 ----
{postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}:
{postrow.POST_SUBJECT}</span></td>
! <td nowrap="nowrap" valign="top" align="right">{postrow.QUOTE_IMG}
! {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
</tr>
<tr>
***************
*** 47,51 ****
</tr>
<tr>
! <td colspan="2"><span class="postbody">{postrow.MESSAGE}</span></td>
</tr>
</table>
--- 47,51 ----
</tr>
<tr>
! <td colspan="2"><span class="postbody">{postrow.MESSAGE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
</tr>
</table>
***************
*** 88,97 ****
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{SITENAME} {L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
! <td align="right" valign="top" nowrap="nowrap"><span class="nav">{L_PAGE}
! <b>{ON_PAGE}</b> {L_OF} <b>{TOTAL_PAGES}</b> :: {PAGINATION}</span>
! <span class="gensmall"><br />
! {S_TIMEZONE}</span></td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
--- 88,99 ----
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{SITENAME} {L_INDEX}</a>
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
! <td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
! </td>
</tr>
+ <tr>
+ <td align="left"><span class="nav">{PAGE_NUMBER}</span></td>
+ </tr>
</table>
+
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
|
|
From: Paul S. O. <ps...@us...> - 2001-10-25 23:21:14
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv20465
Modified Files:
viewtopic.php viewforum.php index.php privmsg.php
Log Message:
Altered various language constructs + new quote changes for PM + altered pagination
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -r1.124 -r1.125
*** viewtopic.php 2001/10/16 23:34:45 1.124
--- viewtopic.php 2001/10/25 23:21:11 1.125
***************
*** 57,61 ****
if( $HTTP_GET_VARS["view"] == "newest" )
{
! if(isset($HTTP_COOKIE_VARS[$board_config['cookie_name']]))
{
$sessiondata = unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name']]));
--- 57,61 ----
if( $HTTP_GET_VARS["view"] == "newest" )
{
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name']]) )
{
$sessiondata = unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name']]));
***************
*** 69,73 ****
ORDER BY post_time ASC
LIMIT 1";
! if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
--- 69,73 ----
ORDER BY post_time ASC
LIMIT 1";
! if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
***************
*** 89,98 ****
}
}
! else if($HTTP_GET_VARS["view"] == "next")
{
$sql_condition = ">";
$sql_ordering = "ASC";
}
! else if($HTTP_GET_VARS["view"] == "previous")
{
$sql_condition = "<";
--- 89,98 ----
}
}
! else if( $HTTP_GET_VARS["view"] == "next" )
{
$sql_condition = ">";
$sql_ordering = "ASC";
}
! else if( $HTTP_GET_VARS["view"] == "previous" )
{
$sql_condition = "<";
***************
*** 117,121 ****
if( !$row = $db->sql_fetchrow($result) )
{
! if($HTTP_GET_VARS["view"] == "next")
{
message_die(GENERAL_MESSAGE, 'No_newer_topics');
--- 117,121 ----
if( !$row = $db->sql_fetchrow($result) )
{
! if( $HTTP_GET_VARS["view"] == "next" )
{
message_die(GENERAL_MESSAGE, 'No_newer_topics');
***************
*** 486,489 ****
--- 486,516 ----
}
+ //
+ // Was a highlight request part of the URI? Yes, this idea was
+ // taken from vB but we did already have a highlighter in place
+ // in search itself ... it's just been extended a bit!
+ //
+
+ if( isset($HTTP_GET_VARS['highlight']) )
+ {
+ //
+ // Split words and phrases
+ //
+ $words = explode(" ", $HTTP_GET_VARS['highlight']);
+
+ for($i = 0; $i < count($words); $i++)
+ {
+ $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
+ $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
+ }
+
+ $highlight_active = ( count($words) ) ? true : false;
+
+ }
+ else
+ {
+ $highlight_active = false;
+ }
+
$template->assign_vars(array(
"FORUM_NAME" => $forum_name,
***************
*** 673,677 ****
{
case USER_AVATAR_UPLOAD:
! $poster_avatar = "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
case USER_AVATAR_REMOTE:
--- 700,704 ----
{
case USER_AVATAR_UPLOAD:
! $poster_avatar = ( $board_config['avatar_upload_db'] ) ? "<img src=\"avatar.$phpEx?p=" . $postrow[$i]['post_id'] . "\" alt=\"\" />" : "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
case USER_AVATAR_REMOTE:
***************
*** 807,811 ****
$quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
! $search_img = "<a href=\"" . append_sid("search.$phpEx?a=" . urlencode($poster) . "&f=all&b=0&d=DESC&c=100&dosearch=1") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
--- 834,838 ----
$quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
! $search_img = "<a href=\"" . append_sid("search.$phpEx?search_author=" . urlencode($poster)) . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
***************
*** 873,876 ****
--- 900,908 ----
}
+ if( $highlight_active )
+ {
+ $message = preg_replace($highlight_match, $highlight_replace, $message);
+ }
+
$message = make_clickable($message);
***************
*** 886,890 ****
}
! if($board_config['allow_smilies'] && $postrow[$i]['enable_smilies'])
{
$message = smilies_pass($message);
--- 918,922 ----
}
! if( $board_config['allow_smilies'] && $postrow[$i]['enable_smilies'] )
{
$message = smilies_pass($message);
***************
*** 896,904 ****
// Editing information
//
! if($postrow[$i]['post_edit_count'])
{
! $l_edit_total = ($postrow[$i]['post_edit_count'] == 1) ? $lang['time_in_total'] : $lang['times_in_total'];
!
! $message = $message . "<br /><br /><font size=\"-2\">" . $lang['Edited_by'] . " " . $poster . " " . $lang['on'] . " " . create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']) . ", " . $lang['edited'] . " " . $postrow[$i]['post_edit_count'] . " $l_edit_total</font>";
}
--- 928,936 ----
// Editing information
//
! if( $postrow[$i]['post_edit_count'] )
{
! $l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
!
! $l_edited_by = "<br /><br />" . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
}
***************
*** 914,917 ****
--- 946,950 ----
"ROW_CLASS" => $row_class,
"MINI_POST_IMG" => $mini_post_img,
+
"POSTER_NAME" => $poster,
"POSTER_RANK" => $poster_rank,
***************
*** 921,927 ****
"POSTER_FROM" => $poster_from,
"POSTER_AVATAR" => $poster_avatar,
"POST_DATE" => $post_date,
"POST_SUBJECT" => $post_subject,
! "MESSAGE" => $message,
"PROFILE_IMG" => $profile_img,
"SEARCH_IMG" => $search_img,
--- 954,963 ----
"POSTER_FROM" => $poster_from,
"POSTER_AVATAR" => $poster_avatar,
+
"POST_DATE" => $post_date,
"POST_SUBJECT" => $post_subject,
! "MESSAGE" => $message,
! "EDITED_MESSAGE" => $l_edited_by,
!
"PROFILE_IMG" => $profile_img,
"SEARCH_IMG" => $search_img,
***************
*** 934,937 ****
--- 970,974 ----
"MSN_IMG" => $msn_img,
"YIM_IMG" => $yim_img,
+
"EDIT_IMG" => $edit_img,
"QUOTE_IMG" => $quote_img,
***************
*** 947,968 ****
// User authorisation levels output
//
! $s_auth_can = $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_vote']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['vote_polls'] . "<br />";
! /*
! $s_auth_post_img = "<img src=\"" . ( ($is_auth['auth_post']) ? $image['auth_can_post'] : $image['auth_cannot_post'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "\" />";
! $s_auth_reply_img = "<img src=\"" . ( ($is_auth['auth_reply']) ? $image['auth_can_reply'] : $image['auth_cannot_reply'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "\" />";
! $s_auth_edit_img = "<img src=\"" . ( ($is_auth['auth_edit']) ? $image['auth_can_edit'] : $image['auth_cannot_edit'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "\" />";
! $s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_delete']) ? $image['auth_can_delete'] : $image['auth_cannot_delete'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "\" />";
! $s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_vote']) ? $image['auth_can_vote'] : $image['auth_cannot_vote'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_vote']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['vote_polls'] . "\" />";
! */
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
!
! // $s_auth_mod_img = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\"><img src=\"" . $images['auth_mod'] . "\" alt=\"" . $lang['You'] . " " . $lang['can'] . " " . $lang['moderate_forum'] . "\" border=\"0\"/></a>";
$topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt = \"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
--- 984,996 ----
// User authorisation levels output
//
! $s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . "<br />";
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a>");
$topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt = \"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
***************
*** 984,990 ****
// Topic watch information
//
! if($can_watch_topic)
{
! if($is_watching_topic)
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
--- 1012,1018 ----
// Topic watch information
//
! if( $can_watch_topic )
{
! if( $is_watching_topic )
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
***************
*** 1004,1022 ****
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start),
! "ON_PAGE" => ( floor( $start / $board_config['posts_per_page'] ) + 1 ),
! "TOTAL_PAGES" => ceil( $total_replies / $board_config['posts_per_page'] ),
"S_AUTH_LIST" => $s_auth_can,
- "S_AUTH_READ_IMG" => $s_auth_read_img,
- "S_AUTH_POST_IMG" => $s_auth_post_img,
- "S_AUTH_REPLY_IMG" => $s_auth_reply_img,
- "S_AUTH_EDIT_IMG" => $s_auth_edit_img,
- "S_AUTH_MOD_IMG" => $s_auth_mod_img,
"S_TOPIC_ADMIN" => $topic_mod,
"S_WATCH_TOPIC" => $s_watching_topic,
- "S_WATCH_TOPIC_IMG" => $s_watching_topic_img,
- "L_OF" => $lang['of'],
- "L_PAGE" => $lang['Page'],
"L_GOTO_PAGE" => $lang['Goto_page'])
);
--- 1032,1041 ----
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start),
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )),
"S_AUTH_LIST" => $s_auth_can,
"S_TOPIC_ADMIN" => $topic_mod,
"S_WATCH_TOPIC" => $s_watching_topic,
"L_GOTO_PAGE" => $lang['Goto_page'])
);
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -r1.94 -r1.95
*** viewforum.php 2001/10/16 16:21:23 1.94
--- viewforum.php 2001/10/25 23:21:11 1.95
***************
*** 118,123 ****
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL
! LIMIT $start, " . $board_config['topics_per_page'];
if(!$t_result = $db->sql_query($sql))
{
--- 118,122 ----
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL";
if(!$t_result = $db->sql_query($sql))
{
***************
*** 149,156 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=viewforum.' . $phpEx . '?' . POST_FORUM_URL . '=' . $forum_id . '">')
);
! $message = $lang['Topics_marked_read'] . "<br /><br />" . $lang['Click'] . " <a href=\"viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id\">" . $lang['HERE'] . "</a> " . $lang['to_return_forum'];
message_die(GENERAL_MESSAGE, $message);
}
--- 148,155 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
! $message = $lang['Topics_marked_read'] . "<br /><br />" . sprintf($lang['Click_return_forum'], "<a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a> ");
message_die(GENERAL_MESSAGE, $message);
}
***************
*** 338,360 ****
// User authorisation levels output
//
! $s_auth_can = $lang['You'] . " " . ( ($is_auth['auth_read']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['read_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
!
! /*
! $s_auth_read_img = "<img src=\"" . ( ($is_auth['auth_read']) ? $image['auth_can_read'] : $image['auth_cannot_read'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_read']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['read_posts'] . "\" />";
! $s_auth_post_img = "<img src=\"" . ( ($is_auth['auth_post']) ? $image['auth_can_post'] : $image['auth_cannot_post'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "\" />";
! $s_auth_reply_img = "<img src=\"" . ( ($is_auth['auth_reply']) ? $image['auth_can_reply'] : $image['auth_cannot_reply'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "\" />";
! $s_auth_edit_img = "<img src=\"" . ( ($is_auth['auth_edit']) ? $image['auth_can_edit'] : $image['auth_cannot_edit'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "\" />";
! $s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_delete']) ? $image['auth_can_delete'] : $image['auth_cannot_delete'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "\" />";
! */
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
!
! // $s_auth_mod_img = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\"><img src=\"" . $images['auth_mod'] . "\" alt=\"" . $lang['You'] . " " . $lang['can'] . " " . $lang['moderate_forum'] . "\" border=\"0\"/></a>";
!
}
else
--- 337,349 ----
// User authorisation levels output
//
! $s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . "<br />";
!
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a>");
}
else
***************
*** 456,460 ****
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
! $goto_page = " (<img src=\"" . $images['icon_minipost'] . "\" alt=\"" . $lang['Goto_page'] . "\" />" . $lang['Goto_page'] . ": ";
$times = 1;
--- 445,449 ----
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
! $goto_page = " [ <img src=\"" . $images['icon_minipost'] . "\" alt=\"" . $lang['Goto_page'] . "\" />" . $lang['Goto_page'] . ": ";
$times = 1;
***************
*** 478,482 ****
$times++;
}
! $goto_page .= ")";
}
else
--- 467,471 ----
$times++;
}
! $goto_page .= " ] ";
}
else
***************
*** 485,494 ****
}
! if($topic_rowset[$i]['topic_status'] == TOPIC_LOCKED)
{
$folder_image = "<img src=\"" . $images['folder_locked'] . "\" alt=\"" . $lang['Topic_locked'] . "\" />";
$newest_post_img = "";
}
! else if($topic_rowset[$i]['topic_status'] == TOPIC_MOVED)
{
$topic_type = $lang['Topic_Moved'] . " ";
--- 474,483 ----
}
! if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED )
{
$folder_image = "<img src=\"" . $images['folder_locked'] . "\" alt=\"" . $lang['Topic_locked'] . "\" />";
$newest_post_img = "";
}
! else if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . " ";
***************
*** 500,509 ****
else
{
! if($topic_rowset[$i]['topic_type'] == POST_ANNOUNCE)
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
! else if($topic_rowset[$i]['topic_type'] == POST_STICKY)
{
$folder = $images['folder_sticky'];
--- 489,498 ----
else
{
! if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
! else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = $images['folder_sticky'];
***************
*** 556,566 ****
$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
! $topic_poster = $topic_rowset[$i]['username'];
! $topic_poster_profile_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']);
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
! $last_post .= ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? $topic_rowset[$i]['user2'] . " " : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['id2']) . "\">" . $topic_rowset[$i]['user2'] . "</a> ";
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
--- 545,556 ----
$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
! $topic_poster = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']) . "\">" : "";
! $topic_poster .= $topic_rowset[$i]['username'];
! $topic_poster .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? "</a>" : "";
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
! $last_post .= ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username'] != "" ) ? $topic_rowset[$i]['post_username'] . " " : $lang['Guest'] . " " ) : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['id2']) . "\">" . $topic_rowset[$i]['user2'] . "</a> ";
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
***************
*** 580,585 ****
"LAST_POST" => $last_post,
! "U_VIEW_TOPIC" => $view_topic_url,
! "U_TOPIC_POSTER_PROFILE" => $topic_poster_profile_url)
);
}
--- 570,574 ----
"LAST_POST" => $last_post,
! "U_VIEW_TOPIC" => $view_topic_url)
);
}
***************
*** 587,595 ****
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
! "ON_PAGE" => ( floor( $start / $board_config['topics_per_page'] ) + 1 ),
! "TOTAL_PAGES" => ceil( $topics_count / $board_config['topics_per_page'] ),
- "L_OF" => $lang['of'],
- "L_PAGE" => $lang['Page'],
"L_GOTO_PAGE" => $lang['Goto_page'],
--- 576,581 ----
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),
"L_GOTO_PAGE" => $lang['Goto_page'],
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/index.php,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -r1.76 -r1.77
*** index.php 2001/10/14 18:22:32 1.76
--- index.php 2001/10/25 23:21:11 1.77
***************
*** 86,93 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=index.' . $phpEx . '">')
);
! $message = $lang['Forums_marked_read'] . "<br /><br />" . $lang['Click'] . " <a href=\"index.$phpEx\">" . $lang['HERE'] . "</a> " . $lang['to_return_index'];
message_die(GENERAL_MESSAGE, $message);
--- 86,93 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
);
! $message = $lang['Forums_marked_read'] . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
message_die(GENERAL_MESSAGE, $message);
***************
*** 105,109 ****
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
- $total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
--- 105,108 ----
***************
*** 137,141 ****
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
--- 136,140 ----
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
***************
*** 143,147 ****
$limit_forums
UNION (
! SELECT f.*, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
--- 142,146 ----
$limit_forums
UNION (
! SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
***************
*** 157,161 ****
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
--- 156,160 ----
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
***************
*** 168,172 ****
$limit_forums = ($viewcat != -1) ? "WHERE f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
--- 167,171 ----
$limit_forums = ($viewcat != -1) ? "WHERE f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
***************
*** 192,196 ****
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL";
if(!$new_topic_ids = $db->sql_query($sql))
{
--- 191,196 ----
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL
! AND t.topic_status <> " . TOPIC_LOCKED;
if(!$new_topic_ids = $db->sql_query($sql))
{
***************
*** 248,257 ****
$template->assign_vars(array(
! "TOTAL_POSTS" => $total_posts,
! "TOTAL_USERS" => $total_users,
! "TOTAL_TOPICS" => $total_topics,
! "NEWEST_USER" => $newest_user,
! "NEWEST_UID" => $newest_uid,
! "USERS_BROWSING" => $users_browsing,
"L_FORUM_LOCKED" => $lang['Forum_is_locked'],
--- 248,254 ----
$template->assign_vars(array(
! "TOTAL_POSTS" => sprintf($lang['Posted_total'], $total_posts),
! "TOTAL_USERS" => ( $total_users == 1 ) ? sprintf($lang['Registered_user_total'], $total_users) : sprintf($lang['Registered_users_total'], $total_users),
! "NEWEST_USER" => sprintf($lang['Newest_user'], "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . "\">", $newest_user, "</a>"),
"L_FORUM_LOCKED" => $lang['Forum_is_locked'],
***************
*** 260,265 ****
"U_SEARCH_NEW" => append_sid("search.$phpEx?search_id=newposts"),
! "U_MARK_READ" => append_sid("index.$phpEx?mark=forums"),
! "U_NEWEST_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid"))
);
--- 257,261 ----
"U_SEARCH_NEW" => append_sid("search.$phpEx?search_id=newposts"),
! "U_MARK_READ" => append_sid("index.$phpEx?mark=forums"))
);
***************
*** 327,332 ****
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
- $last_post .= ( $forum_rows[$j]['user_id'] == ANONYMOUS ) ? $forum_rows[$j]['username'] . " " : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_rows[$j]['user_id']) . "\">" . $forum_rows[$j]['username'] . "</a> ";
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $forum_rows[$j]['forum_last_post_id']) . "#" . $forum_rows[$j]['forum_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
}
--- 323,329 ----
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
+ $last_post .= ( $forum_rows[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_rows[$j]['post_username'] != "" ) ? $forum_rows[$j]['post_username'] . " " : $lang['Guest'] . " " ) : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_rows[$j]['user_id']) . "\">" . $forum_rows[$j]['username'] . "</a> ";
+
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $forum_rows[$j]['forum_last_post_id']) . "#" . $forum_rows[$j]['forum_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
}
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** privmsg.php 2001/10/16 14:43:03 1.36
--- privmsg.php 2001/10/25 23:21:11 1.37
***************
*** 785,789 ****
$attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : $userdata['user_attachsig'];
-
$user_sig = ( $userdata['user_sig'] != "" ) ? $userdata['user_sig'] : "";
--- 785,788 ----
***************
*** 999,1006 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=privmsg.' . $phpEx . '?folder=inbox">')
);
! $msg = $lang['Message_sent'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("privmsg.$phpEx?folder=inbox") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_inbox'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("index.$phpEx") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_index'];
message_die(GENERAL_MESSAGE, $msg);
--- 998,1005 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("privmsg.$phpEx?folder=inbox") . '">')
);
! $msg = $lang['Message_sent'] . "<br /><br />" . sprintf($lang['Click_return_inbox'], "<a href=\"" . append_sid("privmsg.$phpEx?folder=inbox") . "\">", "</a> ") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $msg);
***************
*** 1168,1174 ****
message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($pm_reply_status) )
{
! // header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true));
}
$privmsg = $db->sql_fetchrow($pm_reply_status);
--- 1167,1174 ----
message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql);
}
+
if( !$db->sql_numrows($pm_reply_status) )
{
! header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true));
}
$privmsg = $db->sql_fetchrow($pm_reply_status);
***************
*** 1179,1182 ****
--- 1179,1187 ----
$to_userid = $privmsg['user_id'];
+ $privmsg_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $privmsg_message);
+ $privmsg_message = str_replace("<br />", "\n", $privmsg_message);
+ $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
+ $privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
+
if( $mode == "quote" )
{
***************
*** 1184,1197 ****
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]";
-
- $privmsg_message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $privmsg_message);
- $privmsg_message = str_replace("<br />", "\n", $privmsg_message);
- $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
- $privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
! $msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['default_timezone']);
- $privmsg_message = $to_username . " wrote:\n\n[quote]\n" . $privmsg_message . "\n[/quote]";
-
$mode = "reply";
}
--- 1189,1195 ----
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]";
! $privmsg_message = "[quote=" . $to_username . "]\n" . $privmsg_message . "\n[/quote]";
$mode = "reply";
}
***************
*** 1707,1712 ****
$template->assign_block_vars("box_size_notice", array());
! $l_box_size_status = $lang['Your'] . " " . $l_box_name . " " . $lang['is'] . " " . $inbox_limit_pct . "% " . $lang['full'];
}
--- 1705,1714 ----
$template->assign_block_vars("box_size_notice", array());
+
+ // $lang_match = array("'{BOXNAME}'", "'{BOXSIZE}'");
+ // $lang_replace = array($l_box_name, $inbox_limit_pct);
+ // $l_box_size_status = preg_replace($lang_match, $lang_replace, $lang['Box_size']);
! $l_box_size_status = sprintf($lang['Box_size'], $l_box_name, $inbox_limit_pct);
}
|
|
From: Paul S. O. <ps...@us...> - 2001-10-25 23:21:14
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english
In directory usw-pr-cvs1:/tmp/cvs-serv20465/language/lang_english
Modified Files:
lang_main.php
Log Message:
Altered various language constructs + new quote changes for PM + altered pagination
Index: lang_main.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** lang_main.php 2001/10/25 08:53:18 1.15
--- lang_main.php 2001/10/25 23:21:11 1.16
***************
*** 20,26 ****
***************************************************************************/
- // -------------------------------------------------------------------------
- // NOTE THE FOLLOWING
- // -------------------------------------------------------------------------
//
// The format of this file is:
--- 20,23 ----
***************
*** 28,40 ****
// ---> $lang['message'] = "text";
//
! // 'message' should be a GOOD representation of text, including capitalisation
! // and underscoring for spacing. Remember different languages often interpret
! // consecutive words in different ways, so if you're building a sentence then
! // try and indicate what 'words' follow if applicable
//
- // The number of phrases should be kept to a minimum so try and reuse as much
- // as possible.
- //
//
--- 25,36 ----
// ---> $lang['message'] = "text";
//
! // You should also try to set a locale and a character
! // encoding (plus direction). The encoding and direction
! // will be sent to the template
//
+ setlocale(LC_ALL, "en");
+ $lang['ENCODING'] = "iso-8859-1";
+ $lang['DIRECTION'] = "LTR";
//
***************
*** 83,88 ****
$lang['Page'] = "Page"; // Followed by the current page number then 'of x' where x is total pages
$lang['Pages'] = "Pages";
$lang['of'] = "of"; // See Page above
- $lang['Go'] = "Go";
$lang['Submit'] = "Submit";
--- 79,89 ----
$lang['Page'] = "Page"; // Followed by the current page number then 'of x' where x is total pages
$lang['Pages'] = "Pages";
+ $lang['IP_Address'] = "IP Address";
+
+ $lang['View_latest_post'] = "View latest post";
+ $lang['Page_of'] = "Page <b>%d</b> of <b>%d</b>"; // Replaces with: Page 1 of 2 for example
+ $lang['Page'] = "Page"; // Followed by the current page number then 'of x' where x is total pages
+ $lang['Pages'] = "Pages";
$lang['of'] = "of"; // See Page above
$lang['Submit'] = "Submit";
***************
*** 91,114 ****
$lang['Yes'] = "Yes";
$lang['No'] = "No";
!
! $lang['Private_messaging'] = "Send a Private Message";
!
! $lang['and'] = "and"; // used within a sentence in various places
$lang['Admin_panel'] = "Go to Administration Panel";
- $lang['You'] = "You"; // This is followed by the auth results for a given function (see below)
- $lang['can'] = "<b>can</b>";
- $lang['cannot'] = "<b>cannot</b>";
- $lang['read_posts'] = "read posts in this forum";
- $lang['post_topics'] = "post new topics in this forum";
- $lang['reply_posts'] = "reply to posts in this forum";
- $lang['edit_posts'] = "edit your posts in this forum";
- $lang['delete_posts'] = "delete your posts in this forum";
- $lang['vote_polls'] = "vote in polls in this forum";
- $lang['moderate_forum'] = "moderate this forum";
-
- $lang['View_latest_post'] = "View latest post";
-
$lang['ICQ'] = "ICQ Number";
$lang['AIM'] = "AIM Address";
--- 92,100 ----
$lang['Yes'] = "Yes";
$lang['No'] = "No";
! $lang['Go'] = "Go";
! $lang['Joined'] = "Joined";
$lang['Admin_panel'] = "Go to Administration Panel";
$lang['ICQ'] = "ICQ Number";
$lang['AIM'] = "AIM Address";
***************
*** 118,130 ****
$lang['Error'] = "Error";
- $lang['HERE'] = "HERE";
-
- $lang['IP_Address'] = "IP Address";
-
$lang['Jump_to'] = "Jump to";
$lang['Select_forum'] = "Select a forum";
- $lang['Go'] = "Go";
$lang['Success'] = "Success";
--- 104,112 ----
$lang['Error'] = "Error";
$lang['Jump_to'] = "Jump to";
$lang['Select_forum'] = "Select a forum";
$lang['Success'] = "Success";
+ $lang['Private_messaging'] = "Send a Private Message";
***************
*** 132,145 ****
// Global Header strings
//
! $lang['There'] = "There";
! $lang['Registered'] = "Registered";
! $lang['Guest'] = "Guest";
! $lang['Hidden'] = "Hidden";
! $lang['None'] = "None";
! $lang['online'] = "online";
$lang['You_last_visit'] = "You last visited on";
$lang['Add'] = "Add";
- $lang['Welcome_to'] = "Welcome to"; // Followed by site name
$lang['Register'] = "Register";
$lang['Profile'] = "Profile";
--- 114,123 ----
// Global Header strings
//
! $lang['Registered_users'] = "Registered Users:";
! $lang['Online_users'] = "In total there are %d users online :: %d Registered, %d Hidden and %d Guests";
! $lang['Online_user'] = "In total there is %d user online :: %d Registered, %d Hidden and %d Guests";
$lang['You_last_visit'] = "You last visited on";
$lang['Add'] = "Add";
$lang['Register'] = "Register";
$lang['Profile'] = "Profile";
***************
*** 160,170 ****
// Stats block text
//
! $lang['Posted_Total'] = "Our users have posted a total of"; // Number of posts
! $lang['We_have'] = "We have"; // # registered users
! $lang['Regedusers'] = "Registered users";
! $lang['newestuser'] = "The newest Registered User is"; // username
! $lang['browsing'] = "browsing";
! $lang['arecurrently'] = "There are currently"; // # users browsing
! $lang['theforums'] = "the forums";
$lang['No_new_posts'] = "No new posts";
--- 138,145 ----
// Stats block text
//
! $lang['Posted_total'] = "Our users have posted a total of <b>%d</b> articles"; // Number of posts
! $lang['Registered_user_total'] = "We have <b>%d</b> registered user"; // # registered users
! $lang['Registered_users_total'] = "We have <b>%d</b> registered users"; // # registered users
! $lang['Newest_user'] = "The newest registered user is <b>%s%s%s</b>"; // username
$lang['No_new_posts'] = "No new posts";
***************
*** 175,179 ****
$lang['Topic_is_locked'] = "Topic is locked";
$lang['Forum_is_locked'] = "Forum is locked";
- $lang['Joined'] = "Joined";
--- 150,153 ----
***************
*** 183,188 ****
$lang['Login'] = "Login";
$lang['Logout'] = "Logout";
- $lang['You_are_logged_in'] = "You are logged in as"; // This is followed by the username
- $lang['You_are_not_logged_in'] = "You are not logged in";
$lang['Forgotten_password'] = "I forgot my password";
$lang['Log_me_in'] = "Log me on automatically each visit";
--- 157,160 ----
***************
*** 208,213 ****
$lang['View_forum'] = "View Forum";
! $lang['Forum_not_exist'] = "The forum you selected does not exist, please go back and try again";
! $lang['Reached_on_error'] = "You have reached this page in error, please go back and try again";
$lang['Display_topics'] = "Display topics from previous";
--- 180,185 ----
$lang['View_forum'] = "View Forum";
! $lang['Forum_not_exist'] = "The forum you selected does not exist";
! $lang['Reached_on_error'] = "You have reached this page in error";
$lang['Display_topics'] = "Display topics from previous";
***************
*** 221,224 ****
--- 193,207 ----
$lang['Topics_marked_read'] = "The topics for this forum have now been marked read";
+ $lang['Rules_post_can'] = "You <b>can</b> post new topics in this forum";
+ $lang['Rules_post_cannot'] = "You <b>can</b> post new topics in this forum";
+ $lang['Rules_reply_can'] = "You <b>can</b> reply to topics in this forum";
+ $lang['Rules_reply_cannot'] = "You <b>can</b> reply to topics in this forum";
+ $lang['Rules_edit_can'] = "You <b>can</b> edit your posts in this forum";
+ $lang['Rules_edit_cannot'] = "You <b>can</b> edit your posts in this forum";
+ $lang['Rules_delete_can'] = "You <b>can</b> delete posts in this forum";
+ $lang['Rules_delete_cannot'] = "You <b>can</b> delete posts in this forum";
+ $lang['Rules_vote_can'] = "You <b>can</b> vote in polls in this forum";
+ $lang['Rules_vote_cannot'] = "You <b>can</b> vote in polls in this forum";
+ $lang['Rules_moderate'] = "You <b>can</b> %smoderate this forum%s"; // %s replaced by a href
//
***************
*** 237,245 ****
$lang['No_older_topics'] = "There are no older topics in this forum";
$lang['Topic_post_not_exist'] = "The topic or post you requested does not exist";
$lang['Display_posts'] = "Display posts from previous";
$lang['All_Posts'] = "All Posts";
$lang['Newest_First'] = "Newest First";
$lang['Oldest_First'] = "Oldest First";
- $lang['No_posts_topic'] = "No posts exist for this topic";
$lang['Return_to_top'] = "Return to top";
--- 220,229 ----
$lang['No_older_topics'] = "There are no older topics in this forum";
$lang['Topic_post_not_exist'] = "The topic or post you requested does not exist";
+ $lang['No_posts_topic'] = "No posts exist for this topic";
+
$lang['Display_posts'] = "Display posts from previous";
$lang['All_Posts'] = "All Posts";
$lang['Newest_First'] = "Newest First";
$lang['Oldest_First'] = "Oldest First";
$lang['Return_to_top'] = "Return to top";
***************
*** 254,262 ****
$lang['Delete_post'] = "Delete this post";
! $lang['Edited_by'] = "Last edited by"; // followed by -> [username] on ...
! $lang['on'] = "on";
! $lang['edited'] = "edited"; // followed by -> [num] times in total
! $lang['time_in_total'] = "time in total";
! $lang['times_in_total'] = "times in total";
$lang['Lock_topic'] = "Lock this topic";
--- 238,243 ----
$lang['Delete_post'] = "Delete this post";
! $lang['Edited_time_total'] = "Last edited by %s on %s, edited %d time in total"; // Last edited by me on 12 Oct 2001, edited 1 time in total
! $lang['Edited_times_total'] = "Last edited by %s on %s, edited %d times in total"; // Last edited by me on 12 Oct 2001, edited 2 times in total
$lang['Lock_topic'] = "Lock this topic";
***************
*** 298,302 ****
$lang['Cancel_post'] = "Cancel post";
! $lang['Flood_Error'] = "You cannot make another post so soon after your last, please try again in a short while.";
$lang['Empty_subject'] = "You must specifiy a subject when posting a new topic";
$lang['Empty_message'] = "You must enter a message when posting";
--- 279,283 ----
$lang['Cancel_post'] = "Cancel post";
! $lang['Flood_Error'] = "You cannot make another post so soon after your last, please try again in a short while";
$lang['Empty_subject'] = "You must specifiy a subject when posting a new topic";
$lang['Empty_message'] = "You must enter a message when posting";
***************
*** 353,356 ****
--- 334,341 ----
$lang['to_return_topic'] = "to return to the topic";
+ $lang['Click_return_topic'] = "Click %sHere%s to return to the topic";
+ $lang['Click_return_forum'] = "Click %sHere%s to return to the forum";
+ $lang['Click_view_message'] = "Click %sHere%s to view your message";
+
$lang['Topic_reply_notification'] = "Topic Reply Notification";
***************
*** 361,370 ****
$lang['Private_Messaging'] = "Private Messaging";
- $lang['You_have'] = "You have"; // followed by "x new message/s"
- $lang['new'] = "new"; // see above
- $lang['message'] = "message"; // see above
- $lang['messages'] = "messages"; // see above
- $lang['No_new_pm'] = "You have no new messages";
$lang['Login_check_pm'] = "Login to check your private messages";
$lang['Inbox'] = "Inbox";
--- 346,353 ----
$lang['Private_Messaging'] = "Private Messaging";
$lang['Login_check_pm'] = "Login to check your private messages";
+ $lang['New_pms'] = "You have %d new messages"; // You have 2 new messages
+ $lang['New_pm'] = "You have %d new message"; // You have 1 new message
+ $lang['No_new_pm'] = "You have no new messages";
$lang['Inbox'] = "Inbox";
***************
*** 383,387 ****
$lang['No_messages_folder'] = "You have no messages in this folder";
! $lang['Cannot_send_privmsg'] = "Sorry but you are not currently allowed to send private messages.";
$lang['No_to_user'] = "You must specify a username to send this message";
$lang['No_such_user'] = "Sorry but no such user exists";
--- 366,370 ----
$lang['No_messages_folder'] = "You have no messages in this folder";
! $lang['Cannot_send_privmsg'] = "Sorry but the administrator has prevented you from sending private messages";
$lang['No_to_user'] = "You must specify a username to send this message";
$lang['No_such_user'] = "Sorry but no such user exists";
***************
*** 389,394 ****
$lang['Message_sent'] = "Your message has been sent";
! $lang['to_return_inbox'] = " to return to your Inbox"; // This follows a "Click HERE ... "
! $lang['to_return_index'] = " to return to the Index"; // This follows a "Click HERE ... "
$lang['Re'] = "Re"; // Re as in 'Response to'
--- 372,377 ----
$lang['Message_sent'] = "Your message has been sent";
! $lang['Click_return_inbox'] = "Click %sHere%s to return to your Inbox";
! $lang['Click_return_index'] = "Click %sHere%s to return to the Index";
$lang['Re'] = "Re"; // Re as in 'Response to'
***************
*** 414,419 ****
$lang['Unmark_all'] = "Unmark all";
! $lang['Your'] = "Your"; // Example of use of this var : "Your Inbox is 50% full";
! $lang['full'] = "full";
--- 397,402 ----
$lang['Unmark_all'] = "Unmark all";
! $lang['Box_size'] = "Your %s is %d%% full"; // eg. Your Inbox is 50% full
! //$lang['Box_size'] = "Your {BOXNAME} is {BOXSIZE}% full"; // eg. Your Inbox is 50% full
***************
*** 689,693 ****
$lang['A_critical_error'] = "A Critical Error Occured";
! $lang['Error_login'] = "Login Failed<br />You have specified an incorrect/inactive username or invalid password, please go back and try again";
$lang['Not_Moderator'] = "You are not a moderator of this forum";
--- 672,676 ----
$lang['A_critical_error'] = "A Critical Error Occured";
! $lang['Error_login'] = "Login Failed<br /><br />You have specified an incorrect or inactive username or an invalid password";
$lang['Not_Moderator'] = "You are not a moderator of this forum";
***************
*** 876,880 ****
$lang['Delete'] = "Delete";
$lang['Sticky'] = "Sticky";
! $lang['Announce'] = "Announce";
$lang['Vote'] = "Vote";
$lang['Pollcreate'] = "Poll create";
--- 859,863 ----
$lang['Delete'] = "Delete";
$lang['Sticky'] = "Sticky";
! $lang['Announce'] = "Announce";
$lang['Vote'] = "Vote";
$lang['Pollcreate'] = "Poll create";
***************
*** 1123,1127 ****
//
$lang['Styles_admin'] = "Styles Administration";
! $lang['Styles_explain'] = "In this panel you can edit or remove styles from your forum. To import a new styles click on 'Add New' in the left hand panel, to create a new styles click on 'Create New'";
$lang['Styles_addnew_explain'] = "The following list contains all the themes that are available for the templates you currently have. The items on this list HAVE NOT yet been installed into the phpBB database. To install a theme simply click the 'install' link beside a selected entry";
$lang['Style'] = "Style";
--- 1106,1110 ----
//
$lang['Styles_admin'] = "Styles Administration";
! $lang['Styles_explain'] = "Using this facility you can add, remove and manage styles (templates and themes) available to your users.";
$lang['Styles_addnew_explain'] = "The following list contains all the themes that are available for the templates you currently have. The items on this list HAVE NOT yet been installed into the phpBB database. To install a theme simply click the 'install' link beside a selected entry";
$lang['Style'] = "Style";
|
|
From: Paul S. O. <ps...@us...> - 2001-10-25 23:21:14
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv20465/includes
Modified Files:
functions.php page_header.php
Log Message:
Altered various language constructs + new quote changes for PM + altered pagination
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -r1.77 -r1.78
*** functions.php 2001/10/16 14:43:03 1.77
--- functions.php 2001/10/25 23:21:11 1.78
***************
*** 30,39 ****
case 'postcount':
$sql = "SELECT COUNT(post_id) AS total
! FROM ".POSTS_TABLE;
break;
case 'usercount':
$sql = "SELECT COUNT(user_id) AS total
! FROM ". USERS_TABLE ."
WHERE user_id <> " . ANONYMOUS;
break;
--- 30,39 ----
case 'postcount':
$sql = "SELECT COUNT(post_id) AS total
! FROM " . POSTS_TABLE;
break;
case 'usercount':
$sql = "SELECT COUNT(user_id) AS total
! FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS;
break;
***************
*** 41,45 ****
case 'newestuser':
$sql = "SELECT user_id, username
! FROM ".USERS_TABLE."
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_id DESC
--- 41,45 ----
case 'newestuser':
$sql = "SELECT user_id, username
! FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_id DESC
***************
*** 49,53 ****
case 'topiccount':
$sql = "SELECT SUM(forum_topics) AS total
! FROM ".FORUMS_TABLE;
break;
}
--- 49,53 ----
case 'topiccount':
$sql = "SELECT SUM(forum_topics) AS total
! FROM " . FORUMS_TABLE;
break;
}
***************
*** 83,95 ****
}
! if($db->sql_numrows($result))
{
- $myrow = $db->sql_fetchrowset($result);
- return($myrow[0]);
- }
- else
- {
message_die(GENERAL_ERROR, "No userdata for this user_id", "", __LINE__, __FILE__, $sql);
}
}
--- 83,95 ----
}
! if( !$db->sql_numrows($result) )
{
message_die(GENERAL_ERROR, "No userdata for this user_id", "", __LINE__, __FILE__, $sql);
}
+
+ $row = $db->sql_fetchrow($result);
+
+ return($row);
+
}
***************
*** 107,119 ****
}
! if($db->sql_numrows($result))
{
- $myrow = $db->sql_fetchrowset($result);
- return($myrow[0]);
- }
- else
- {
message_die(GENERAL_ERROR, "Tried obtaining data for a non-existent user", "", __LINE__, __FILE__, $sql);
}
}
--- 107,118 ----
}
! if( !$db->sql_numrows($result) )
{
message_die(GENERAL_ERROR, "Tried obtaining data for a non-existent user", "", __LINE__, __FILE__, $sql);
}
+
+ $row = $db->sql_fetchrow($result);
+
+ return($row);
}
***************
*** 227,245 ****
function init_userprefs($userdata)
{
! global $board_config, $theme, $images, $template, $lang, $phpEx, $phpbb_root_path;
! // if( !defined("IN_ADMIN") )
! // {
! if( !$board_config['override_user_style'] )
{
! if( $userdata['user_id'] != ANONYMOUS && isset($userdata['user_style']) )
! {
! $theme = setup_style($userdata['user_style']);
! if( !$theme )
! {
! $theme = setup_style($board_config['default_style']);
! }
! }
! else
{
$theme = setup_style($board_config['default_style']);
--- 226,238 ----
function init_userprefs($userdata)
{
! global $board_config, $theme, $images;
! global $template, $lang, $phpEx, $phpbb_root_path;
! if( !$board_config['override_user_style'] )
! {
! if( $userdata['user_id'] != ANONYMOUS && isset($userdata['user_style']) )
{
! $theme = setup_style($userdata['user_style']);
! if( !$theme )
{
$theme = setup_style($board_config['default_style']);
***************
*** 250,258 ****
$theme = setup_style($board_config['default_style']);
}
! // }
! // else
! // {
! // $theme = setup_style($board_config['default_admin_style']);
! // }
if( $userdata['user_id'] != ANONYMOUS )
--- 243,251 ----
$theme = setup_style($board_config['default_style']);
}
! }
! else
! {
! $theme = setup_style($board_config['default_style']);
! }
if( $userdata['user_id'] != ANONYMOUS )
***************
*** 263,272 ****
}
! if(!empty($userdata['user_dateformat']))
{
$board_config['default_dateformat'] = $userdata['user_dateformat'];
}
! if(isset($userdata['user_timezone']))
{
$board_config['board_timezone'] = $userdata['user_timezone'];
--- 256,265 ----
}
! if( !empty($userdata['user_dateformat']) )
{
$board_config['default_dateformat'] = $userdata['user_dateformat'];
}
! if( isset($userdata['user_timezone']) )
{
$board_config['board_timezone'] = $userdata['user_timezone'];
***************
*** 274,284 ****
}
! if(file_exists("language/lang_".$board_config['default_lang']."/lang_main.".$phpEx) )
{
! include($phpbb_root_path . 'language/lang_'.$board_config['default_lang'].'/lang_main.'.$phpEx);
}
else
{
! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
}
--- 267,277 ----
}
! if( file_exists($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.".$phpEx) )
{
! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
}
else
{
! include($phpbb_root_path . 'language/lang_english/lang_main.' . $phpEx);
}
***************
*** 303,308 ****
}
- // $template_path = ( defined('IN_ADMIN') ) ? 'admin/templates/' : 'templates/' ;
- // $template_name = ( defined('IN_ADMIN') ) ? $board_config['board_admin_template'] : $myrow['template_name'] ;
$template_path = 'templates/' ;
$template_name = $row['template_name'] ;
--- 296,299 ----
***************
*** 350,355 ****
$ip_sep = explode(".", $dotquad_ip);
return (sprintf("%02x%02x%02x%02x", $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]));
-
- // return (( $ip_sep[0] * 0xFFFFFF + $ip_sep[0] ) + ( $ip_sep[1] * 0xFFFF + $ip_sep[1] ) + ( $ip_sep[2] * 0xFF + $ip_sep[2] ) + ( $ip_sep[3] ) );
}
--- 341,344 ----
***************
*** 358,363 ****
$hexipbang = explode(".",chunk_split($int_ip, 2, "."));
return hexdec($hexipbang[0]).".".hexdec($hexipbang[1]).".".hexdec($hexipbang[2]).".".hexdec($hexipbang[3]);
-
- // return sprintf( "%d.%d.%d.%d", ( ( $int_ip >> 24 ) & 0xFF ), ( ( $int_ip >> 16 ) & 0xFF ), ( ( $int_ip >> 8 ) & 0xFF ), ( ( $int_ip ) & 0xFF ) );
}
--- 347,350 ----
***************
*** 388,452 ****
$total_pages = ceil($num_items/$per_page);
! if($total_pages == 1)
{
return "";
}
! $on_page = floor($start_item/$per_page) + 1;
$page_string = "";
! $this_block_start = ($on_page < 10) ? 1 : floor($on_page/10) * 10;
! $this_block_end = ($on_page < 10) ? 9 : $this_block_start + 9;
! if($this_block_end > $total_pages)
{
- $this_block_end = $total_pages;
- }
! for($i = $this_block_start; $i <= $this_block_end; $i++)
! {
! $page_string .= ($i == $on_page) ? "<b>$i</b>" : "<a href=\"".append_sid($base_url . "&start=" . (($i - 1) * $per_page)) . "\">$i</a>";
! if($i < $this_block_end)
{
! $page_string .= ", ";
}
- }
! if($this_block_start > 1)
! {
! $page_string_prepend = "";
! for($i = 0; $i < $this_block_start; $i += 10)
{
! $page_string_prepend .= "<a href=\"" . append_sid($base_url . "&start=" . ($i * $per_page)) . "\">" . ( ($i == 0) ? ($i + 1) : $i) . " - " . ($i + 9) . "</a>, ";
! }
! $page_string = $page_string_prepend . $page_string;
! }
! if($this_block_end < $total_pages)
! {
! $page_string_append = ", ";
! if(!($total_pages%10))
! {
! $page_url = append_sid($base_url."&start=".( ( ($this_block_end + 1) * $per_page ) - $per_page ) );
! $page_string_append .= "<a href=\"$page_url\">$total_pages</a>";
! }
! else
! {
! for($i = $this_block_end + 1; $i < $total_pages; $i += 10)
{
! $page_string_append .= "<a href=\"" . append_sid($base_url . "&start=" . (($i * $per_page) - $per_page)) . "\">" . ( ($i == 0) ? ($i + 1) : $i) . " - " . ((($i + 9) < $total_pages) ? ($i + 9) : $total_pages) . "</a>";
! if($i < $total_pages - 10)
{
! $page_string_append .= ", ";
}
}
}
- $page_string .= $page_string_append;
}
! if($add_prevnext_text)
{
if($on_page > 1)
--- 375,450 ----
$total_pages = ceil($num_items/$per_page);
!
! if( $total_pages == 1 )
{
return "";
}
! $on_page = floor($start_item / $per_page) + 1;
$page_string = "";
! if( $total_pages > 8 )
{
! $init_page_max = ( $total_pages > 2 ) ? 2 : $total_pages;
!
! for($i = 1; $i < $init_page_max + 1; $i++)
{
! $page_string .= ($i == $on_page) ? "<b>$i</b>" : "<a href=\"" . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page )) . "\">$i</a>";
! if( $i < $init_page_max )
! {
! $page_string .= ", ";
! }
}
! if( $total_pages > 2 )
{
! if( $on_page > 1 && $on_page < $total_pages )
! {
! $page_string .= ( $on_page > 4 ) ? " ... " : ", ";
! $init_page_min = ( $on_page > 3 ) ? $on_page : 4;
! $init_page_max = ( $on_page < $total_pages - 3 ) ? $on_page : $total_pages - 3;
! for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++)
! {
! $page_string .= ($i == $on_page) ? "<b>$i</b>" : "<a href=\"" . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page )) . "\">$i</a>";
! if( $i < $init_page_max + 1 )
! {
! $page_string .= ", ";
! }
! }
! $page_string .= ( $on_page < $total_pages - 3 ) ? " ... " : ", ";
! }
! else
! {
! $page_string .= " ... ";
! }
! for($i = $total_pages - 1; $i < $total_pages + 1; $i++)
{
! $page_string .= ($i == $on_page) ? "<b>$i</b>" : "<a href=\"" . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page )) . "\">$i</a>";
! if( $i < $total_pages )
{
! $page_string .= ", ";
}
}
+ }
+ }
+ else
+ {
+ for($i = 1; $i < $total_pages + 1; $i++)
+ {
+ $page_string .= ($i == $on_page) ? "<b>$i</b>" : "<a href=\"" . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page )) . "\">$i</a>";
+ if( $i < $total_pages )
+ {
+ $page_string .= ", ";
+ }
}
}
! if( $add_prevnext_text )
{
if($on_page > 1)
***************
*** 454,457 ****
--- 452,456 ----
$page_string = " <a href=\"" . append_sid($base_url . "&start=" . (($on_page - 2) * $per_page)) . "\">" . $lang['Previous'] . "</a> " . $page_string;
}
+
if($on_page < $total_pages)
{
***************
*** 459,465 ****
}
- $page_string = $lang['Goto_page'] . ": " . $page_string;
-
}
return $page_string;
--- 458,464 ----
}
}
+
+ $page_string = $lang['Goto_page'] . " " . $page_string;
return $page_string;
Index: page_header.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_header.php,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -r1.55 -r1.56
*** page_header.php 2001/10/16 11:12:32 1.55
--- page_header.php 2001/10/25 23:21:12 1.56
***************
*** 143,153 ****
}
}
! $l_g_user_s = ($guests_online == 1) ? $lang['User'] : $lang['Users'];
! $l_h_user_s = ($logged_hidden_online == 1) ? $lang['User'] : $lang['Users'];
! $l_r_user_s = ($logged_visible_online == 1) ? $lang['User'] : $lang['Users'];
! $l_is_are = ($logged_visible_online == 1) ? $lang['is'] : $lang['are'];
! $online_userlist = ($logged_visible_online > 0) ? $lang['Registered'] . " $l_r_user_s: " . $online_userlist : $lang['Registered'] . " $l_r_user_s: " . $lang['None'];
//
// Obtain number of new private messages
--- 143,152 ----
}
}
+ $online_userlist = $lang['Registered_users'] . " " . $online_userlist;
! $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
+ $l_online_users = ( $total_online_users == 1 ) ? sprintf($lang['Online_user'], $total_online_users, $logged_visible_online, $logged_hidden_online, $guests_online) : sprintf($lang['Online_users'], $total_online_users, $logged_visible_online, $logged_hidden_online, $guests_online);
+
//
// Obtain number of new private messages
***************
*** 169,174 ****
$new_pm_messages = $pm_result['new_messages'];
! $l_message_new = ( $new_pm_messages == 1 ) ? $lang['message'] : $lang['messages'];
! $l_privmsgs_text = $lang['You_have'] . " $new_pm_messages " . $lang['new'] . " $l_message_new";
}
else
--- 168,173 ----
$new_pm_messages = $pm_result['new_messages'];
! $l_message_new = ( $new_pm_messages == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
! $l_privmsgs_text = sprintf($l_message_new, $new_pm_messages);
}
else
***************
*** 190,198 ****
"SITENAME" => $board_config['sitename'],
"PAGE_TITLE" => $page_title,
! "TOTAL_USERS_ONLINE" => $lang['There'] . " $l_is_are $logged_visible_online " . $lang['Registered'] . " $l_r_user_s, $logged_hidden_online " . $lang['Hidden'] . " $l_h_user_s ". $lang['and'] . " $guests_online " . $lang['Guest'] . " $l_g_user_s " . $lang['online'],
"LOGGED_IN_USER_LIST" => $online_userlist,
"PRIVATE_MESSAGE_INFO" => $l_privmsgs_text,
"PRIVATE_MESSAGE_COUNT" => $new_pm_messages_session,
! "LAST_VISIT_DATE" => $s_last_visit,
"L_USERNAME" => $lang['Username'],
--- 189,197 ----
"SITENAME" => $board_config['sitename'],
"PAGE_TITLE" => $page_title,
! "TOTAL_USERS_ONLINE" => $l_online_users,
"LOGGED_IN_USER_LIST" => $online_userlist,
"PRIVATE_MESSAGE_INFO" => $l_privmsgs_text,
"PRIVATE_MESSAGE_COUNT" => $new_pm_messages_session,
! "LAST_VISIT_DATE" => $s_last_visit,
"L_USERNAME" => $lang['Username'],
***************
*** 200,204 ****
"L_LOGIN" => $lang['Login'],
"L_LOG_ME_IN" => $lang['Log_me_in'],
- "L_WELCOMETO" => $lang['Welcome_to'],
"L_INDEX" => $lang['Forum_Index'],
"L_REGISTER" => $lang['Register'],
--- 199,202 ----
***************
*** 217,225 ****
"L_LASTPOST" => $lang['Last_Post'],
"L_MODERATOR" => $lang['Moderator'],
! "L_NONEWPOSTS" => $lang['No_new_posts'],
! "L_NEWPOSTS" => $lang['New_posts'],
! "L_NONEWPOSTS_HOT" => $lang['No_new_posts_hot'],
! "L_NEWPOSTS_HOT" => $lang['New_posts_hot'],
! "L_TOPIC_IS_LOCKED" => $lang['Topic_is_locked'],
"L_POSTED" => $lang['Posted'],
"L_JOINED" => $lang['Joined'],
--- 215,225 ----
"L_LASTPOST" => $lang['Last_Post'],
"L_MODERATOR" => $lang['Moderator'],
! "L_NO_NEW_POSTS" => $lang['No_new_posts'],
! "L_NEW_POSTS" => $lang['New_posts'],
! "L_NO_NEW_POSTS_HOT" => $lang['No_new_posts_hot'],
! "L_NEW_POSTS_HOT" => $lang['New_posts_hot'],
! "L_TOPIC_IS_LOCKED" => $lang['Topic_is_locked'],
! "L_ANNOUNCEMENT" => $lang['Post_Announcement'],
! "L_STICKY" => $lang['Post_Sticky'],
"L_POSTED" => $lang['Posted'],
"L_JOINED" => $lang['Joined'],
***************
*** 243,246 ****
--- 243,248 ----
"U_GROUP_CP" => append_sid("groupcp.".$phpEx),
+ "S_CONTENT_DIRECTION" => $lang['DIRECTION'],
+ "S_CONTENT_ENCODING" => $lang['ENCODING'],
"S_TIMEZONE" => $lang['All_times'] . " " . $lang[$board_config['board_timezone']],
"S_LOGIN_ACTION" => append_sid("login.$phpEx"),
***************
*** 292,300 ****
if( !$userdata['session_logged_in'] )
{
! $template->assign_block_vars("user_logged_out", array());
}
else
{
! $template->assign_block_vars("user_logged_in", array());
}
--- 294,302 ----
if( !$userdata['session_logged_in'] )
{
! $template->assign_block_vars("switch_user_logged_out", array());
}
else
{
! $template->assign_block_vars("switch_user_logged_in", array());
}
|
|
From: James A. <th...@us...> - 2001-10-25 08:59:54
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv9761
Modified Files:
constants.php
Log Message:
Not sure what a TALBE is..heh
Index: constants.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/constants.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** constants.php 2001/10/25 08:53:17 1.36
--- constants.php 2001/10/25 08:59:51 1.37
***************
*** 168,172 ****
define('SMILIES_TABLE', $table_prefix.'smilies');
define('THEMES_TABLE', $table_prefix.'themes');
! define('THEMES_NAME_TALBE', $table_prefix.'themes_name');
define('TOPICS_TABLE', $table_prefix.'topics');
define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
--- 168,172 ----
define('SMILIES_TABLE', $table_prefix.'smilies');
define('THEMES_TABLE', $table_prefix.'themes');
! define('THEMES_NAME_TABLE', $table_prefix.'themes_name');
define('TOPICS_TABLE', $table_prefix.'topics');
define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
|
|
From: James A. <th...@us...> - 2001-10-25 08:57:42
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv9304
Modified Files:
admin_styles.php
Log Message:
Couple tweeks to the file gerneration to make it a more 'proper' array.
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** admin_styles.php 2001/10/25 08:53:17 1.2
--- admin_styles.php 2001/10/25 08:57:39 1.3
***************
*** 217,223 ****
while(list($key, $val) = each($theme_rowset[$i]))
{
! if(!intval($key) && $key != "0")
{
! $theme_data .= '$' . $template_name . "[$i][$key] = \"$val\";\n";
}
}
--- 217,223 ----
while(list($key, $val) = each($theme_rowset[$i]))
{
! if(!intval($key) && $key != "0" && $key != "themes_id")
{
! $theme_data .= '$' . $template_name . "[$i]['$key'] = \"$val\";\n";
}
}
|
|
From: James A. <th...@us...> - 2001-10-25 08:53:21
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv8290/language/lang_english Modified Files: lang_main.php Log Message: A little over half done the styles admin Can do: Add new themes from cfg file, export theme data to cfg file, remove themes Cannot do: Created or edit themes Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** lang_main.php 2001/10/24 22:52:22 1.14 --- lang_main.php 2001/10/25 08:53:18 1.15 *************** *** 1124,1131 **** $lang['Styles_admin'] = "Styles Administration"; $lang['Styles_explain'] = "In this panel you can edit or remove styles from your forum. To import a new styles click on 'Add New' in the left hand panel, to create a new styles click on 'Create New'"; $lang['Style'] = "Style"; $lang['Template'] = "Template"; ! ! // // That's all Folks! --- 1124,1142 ---- $lang['Styles_admin'] = "Styles Administration"; $lang['Styles_explain'] = "In this panel you can edit or remove styles from your forum. To import a new styles click on 'Add New' in the left hand panel, to create a new styles click on 'Create New'"; + $lang['Styles_addnew_explain'] = "The following list contains all the themes that are available for the templates you currently have. The items on this list HAVE NOT yet been installed into the phpBB database. To install a theme simply click the 'install' link beside a selected entry"; $lang['Style'] = "Style"; $lang['Template'] = "Template"; ! $lang['Install'] = "Install"; ! $lang['Confirm_delete_style'] = "Are you sure you want to delete this style?"; ! $lang['Style_removed'] = "The selected style has been removed from the database. To fully remove this style from your system you must delete the appropriate directory from your templates directory."; ! $lang['Theme_installed'] = "The selected theme has been installed successfully"; ! $lang['Export_themes'] = "Export Themes"; ! $lang['Download_theme_cfg'] = "The exporter could not write the theme information file. Click the button below to download this file with your browser. Once you have downloaded it you can transer it to your templates dir and package your template for distribution if you choose."; ! $lang['No_themes'] = "The template you selected has no themes attached to it. Click on the 'Create New' link to the left to create one."; ! $lang['Download'] = "Download"; ! $lang['No_template_dir'] = "Could not open template dir, it may be unreadable by the webserver or may not exist"; ! $lang['Export_explain'] = "In this panel you will be able to export the theme data for a selected template. Select the template from the list below and the script will create the theme configuration file and attempt to save it to the selected template directory. If it cannot save the file itself it will give you the option to download it. In order for the script to save the file you must give write access to the webserver for the selected template dir. For more information on this see the phpBB users guide."; ! $lang['Select_template'] = "Select a Template"; ! $lang['Theme_info_saved'] = "The theme information for the selected template has been saved. You should now return the permissions on the theme_info.cfg and/or selected template directory to READ ONLY."; // // That's all Folks! |
|
From: James A. <th...@us...> - 2001-10-25 08:53:21
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv8290/includes
Modified Files:
constants.php
Log Message:
A little over half done the styles admin
Can do: Add new themes from cfg file, export theme data to cfg file, remove themes
Cannot do: Created or edit themes
Index: constants.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/constants.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** constants.php 2001/10/11 22:05:36 1.35
--- constants.php 2001/10/25 08:53:17 1.36
***************
*** 168,171 ****
--- 168,172 ----
define('SMILIES_TABLE', $table_prefix.'smilies');
define('THEMES_TABLE', $table_prefix.'themes');
+ define('THEMES_NAME_TALBE', $table_prefix.'themes_name');
define('TOPICS_TABLE', $table_prefix.'topics');
define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
|
|
From: James A. <th...@us...> - 2001-10-25 08:53:21
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv8290/templates/subSilver/admin
Added Files:
styles_addnew_body.tpl styles_exporter.tpl
styles_list_body.tpl
Log Message:
A little over half done the styles admin
Can do: Add new themes from cfg file, export theme data to cfg file, remove themes
Cannot do: Created or edit themes
--- NEW FILE ---
<h1>{L_STYLES_TITLE}</h1>
<P>{L_STYLES_ADD_TEXT}</p>
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_STYLE}</th>
<th class="thTop">{L_TEMPLATE}</th>
<th class="thCornerR">{L_ACTION}</th>
</tr>
<!-- BEGIN styles -->
<tr>
<td class="{styles.ROW_CLASS}">{styles.STYLE_NAME}</td>
<td class="{styles.ROW_CLASS}">{styles.TEMPLATE_NAME}</td>
<td class="{styles.ROW_CLASS}"><a href="{styles.U_STYLES_INSTALL}">{L_INSTALL}</a></td>
</tr>
<!-- END styles -->
</table></form>
--- NEW FILE ---
<h1>{L_STYLE_EXPORTER}</h1>
<p>{L_EXPORTER_EXPLAIN}</p>
<form method="post" action="{S_EXPORTER_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" align="center">{L_TEMPLATE_SELECT}</th>
</tr>
<tr>
<td class="row1" align="center">{S_TEMPLATE_SELECT} <input type="submit" name="edit" value="{L_SUBMIT}" class="mainoption" /> </td>
</tr>
</table></form>
--- NEW FILE ---
<h1>{L_STYLES_TITLE}</h1>
<P>{L_STYLES_TEXT}</p>
<table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thCornerL">{L_STYLE}</th>
<th class="thTop">{L_TEMPLATE}</th>
<th class="thTop">{L_EDIT}</th>
<th colspan="2" class="thCornerR">{L_DELETE}</th>
</tr>
<!-- BEGIN styles -->
<tr>
<td class="{styles.ROW_CLASS}">{styles.STYLE_NAME}</td>
<td class="{styles.ROW_CLASS}">{styles.TEMPLATE_NAME}</td>
<td class="{styles.ROW_CLASS}"><a href="{styles.U_STYLES_EDIT}">{L_EDIT}</a></td>
<td class="{styles.ROW_CLASS}"><a href="{styles.U_STYLES_DELETE}">{L_DELETE}</a></td>
</tr>
<!-- END styles -->
</table></form>
|
|
From: James A. <th...@us...> - 2001-10-25 08:53:21
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv8290/admin
Modified Files:
admin_styles.php
Log Message:
A little over half done the styles admin
Can do: Add new themes from cfg file, export theme data to cfg file, remove themes
Cannot do: Created or edit themes
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** admin_styles.php 2001/10/14 15:46:53 1.1
--- admin_styles.php 2001/10/25 08:53:17 1.2
***************
*** 25,30 ****
$file = basename(__FILE__);
$module['Styles']['Add_new'] = "$file?mode=addnew";
! $module['Styles']['Create_new'] = "$file?mode=addnew";
$module['Styles']['Manage'] = "$file";
return;
}
--- 25,31 ----
$file = basename(__FILE__);
$module['Styles']['Add_new'] = "$file?mode=addnew";
! $module['Styles']['Create_new'] = "$file?mode=create";
$module['Styles']['Manage'] = "$file";
+ $module['Styles']['Export'] = "$file?mode=export";
return;
}
***************
*** 34,40 ****
//
$phpbb_root_dir = "./../";
- require('pagestart.inc');
! if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
--- 35,56 ----
//
$phpbb_root_dir = "./../";
! //
! // Check if the user has cancled a confirmation message.
! //
! $confirm = ( $HTTP_POST_VARS['confirm'] ) ? TRUE : FALSE;
! $cancel = ( $HTTP_POST_VARS['cancel'] ) ? TRUE : FALSE;
!
! if($cancel)
! {
! header("Location: $PHP_SELF");
! }
!
! if(!$HTTP_POST_VARS['send_file'])
! {
! require('pagestart.inc');
! }
!
! if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
***************
*** 44,49 ****
$mode = "";
}
! include('page_footer_admin.'.$phpEx);
?>
--- 60,411 ----
$mode = "";
}
+
+ switch($mode)
+ {
+ case "addnew":
+ $install_to = ($HTTP_GET_VARS['install_to']) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to'];
+ $style_name = ($HTTP_GET_VARS['style']) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style'];
+
+ if(isset($install_to))
+ {
+ include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg");
+ $template_name = $$install_to;
+ $found = FALSE;
+
+ for($i = 0; $i < count($template_name) && !$found; $i++)
+ {
+ if($template_name[$i]['style_name'] == $style_name)
+ {
+ while(list($key, $val) = each($template_name[$i]))
+ {
+ $db_fields[] = $key;
+ $db_values[] = $val;
+ }
+ }
+ }
+
+ $sql = "INSERT INTO " . THEMES_TABLE . " (";
+ for($i = 0; $i < count($db_fields); $i++)
+ {
+ $sql .= $db_fields[$i];
+ if($i != (count($db_fields) - 1))
+ {
+ $sql .= ", ";
+ }
+
+ }
+ $sql .= ") VALUES (";
+ for($i = 0; $i < count($db_values); $i++)
+ {
+ $sql .= "'" . $db_values[$i] . "'";
+ if($i != (count($db_values) - 1))
+ {
+ $sql .= ", ";
+ }
+ }
+ $sql .= ")";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not insert theme data!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ message_die(GENERAL_MESSAGE, $lang['Theme_installed'], $lang['Success']);
+
+ }
+ else
+ {
+
+ $installable_themes = array();
+
+ if($dir = opendir($phpbb_root_dir . "templates/"))
+ {
+ while($sub_dir = readdir($dir))
+ {
+ if($sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS")
+ {
+ if(file_exists($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg"))
+ {
+ include($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg");
+
+ for($i = 0; $i < count($$sub_dir); $i++)
+ {
+ $working_data = $$sub_dir;
+
+ $style_name = $working_data[$i]['style_name'];
+
+ $sql = "SELECT themes_id FROM " . THEMES_TABLE . " WHERE style_name = '$style_name'";
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENREAL_ERROR, "Could not query themes table!", "Error", __LINE__, __FILE__, $sql);
+ }
+ if(!$db->sql_numrows($result))
+ {
+ $installable_themes[] = $working_data[$i];
+ }
+ }
+ }
+ }
+ }
+
+ $template->set_filenames(array(
+ "body" => "admin/styles_addnew_body.tpl")
+ );
+
+ $template->assign_vars(array(
+ "L_STYLES_TITLE" => $lang['Styles_admin'],
+ "L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'],
+ "L_STYLE" => $lang['Style'],
+ "L_TEMPLATE" => $lang['Template'],
+ "L_INSTALL" => $lang['Install'],
+ "L_ACTION" => $lang['Action'])
+ );
+
+ for($i = 0; $i < count($installable_themes); $i++)
+ {
+ $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
+ $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
+
+ $template->assign_block_vars("styles", array(
+ "STYLE_NAME" => $installable_themes[$i]['style_name'],
+ "TEMPLATE_NAME" => $installable_themes[$i]['template_name'],
+ "ROW_CLASS" => $row_class,
+ "ROW_COLOR" => $row_color,
+ "U_STYLES_INSTALL" => append_sid("admin_styles.$phpEx?mode=addnew&style=" . urlencode($installable_themes[$i]['style_name']) . "&install_to=" . urlencode($installable_themes[$i]['template_name'])))
+ );
+
+ }
+ $template->pparse("body");
+
+ }
+ closedir($dir);
+ }
+
+
+ break;
+
+ case "create":
+ case "edit":
+
+
+ break;
+ case "export";
+
+ if($HTTP_POST_VARS['export_template'])
+ {
+ $template_name = $HTTP_POST_VARS['export_template'];
+ $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE template_name = '$template_name'";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not get theme data for selected template", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ $theme_rowset = $db->sql_fetchrowset($result);
+
+ if(count($theme_rowset) == 0)
+ {
+ message_die(GENERAL_MESSAGE, $lang['No_themes'], $lang['Export_themes']);
+ }
+
+ $theme_data = '<?php'."\n\n";
+ $theme_data .= "//\n// phpBB 2.x auto-generated theme config file for $template_name\n// Do not change anything in this file!\n//\n\n";
+
+
+ for($i = 0; $i < count($theme_rowset); $i++)
+ {
+ while(list($key, $val) = each($theme_rowset[$i]))
+ {
+ if(!intval($key) && $key != "0")
+ {
+ $theme_data .= '$' . $template_name . "[$i][$key] = \"$val\";\n";
+ }
+ }
+ $theme_data .= "\n";
+ }
+
+ $theme_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
+
+
+ @umask(0111);
+
+ $fp = @fopen($phpbb_root_path . 'templates/' . $template_name . '/theme_info.cfg', 'w');
+ if( !$fp )
+ {
+ //
+ // Unable to open the file writeable do something here as an attempt
+ // to get around that...
+ //
+ $s_hidden_fields = '<input type="hidden" name="theme_info" value="' . htmlspecialchars($theme_data) . '" />';
+ $s_hidden_fields .= '<input type="hidden" name="send_file" value="1" /><input type="hidden" name="mode" value="export" />';
+
+ $download_form = '<form action="'. append_sid("admin_styles.$phpEx") .'" method="POST"><input type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields;
+ $template->set_filenames(array(
+ "body" => "message_body.tpl")
+ );
+
+ $template->assign_vars(array(
+ "MESSAGE_TITLE" => $lang['Export_themes'],
+ "MESSAGE_TEXT" => $lang['Download_theme_cfg'] . "<br />" . $download_form)
+ );
! $template->pparse('body');
! exit();
! }
!
! $result = @fputs($fp, $theme_data, strlen($theme_data));
! fclose($fp);
!
! message_die(GENERAL_MESSAGE, $lang['Theme_info_saved'], $lang['Success']);
!
!
! }
! else if($HTTP_POST_VARS['send_file'])
! {
!
! header("Content-Type: text/x-delimtext; name=\"theme_info.cfg\"");
! header("Content-disposition: attachment; filename=theme_info.cfg");
! if( get_magic_quotes_gpc() )
! {
! $HTTP_POST_VARS['theme_info'] = stripslashes($HTTP_POST_VARS['theme_info']);
! }
! echo $HTTP_POST_VARS['theme_info'];
! }
! else
! {
! $template->set_filenames(array(
! "body" => "admin/styles_exporter.tpl")
! );
!
! if($dir = opendir($phpbb_root_path . 'templates/'))
! {
! $s_template_select = '<select name="export_template">';
! while($file = readdir($dir))
! {
! if($file != "." && $file != ".." && $file != "CVS")
! {
! $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
! }
! }
! }
! else
! {
! message_die(GENERAL_ERROR, $lang['No_template_dir'], $lang['Error'], __LINE__, __FILE__);
! }
!
! $template->assign_vars(array(
! "L_STYLE_EXPORTER" => $lang['Export_themes'],
! "L_EXPORTER_EXPLAIN" => $lang['Export_explain'],
! "S_EXPORTER_ACTION" => append_sid("$PHP_SELF?mode=export"),
! "L_TEMPLATE_SELECT" => $lang['Select_template'],
! "S_TEMPLATE_SELECT" => $s_template_select,
! "L_SUBMIT" => $lang['Submit'])
! );
!
! $template->pparse("body");
!
! }
!
! break;
! case "delete":
! $style_id = ($HTTP_GET_VARS['style_id']) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']);
!
! if(!$confirm)
! {
! $hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />';
!
! //
! // Set template files
! //
! $template->set_filenames(array(
! "confirm" => "confirm_body.tpl")
! );
!
! $template->assign_vars(array(
! "MESSAGE_TITLE" => $lang['Confirm'],
! "MESSAGE_TEXT" => $lang['Confirm_delete_style'],
!
! "L_YES" => $lang['Yes'],
! "L_NO" => $lang['No'],
!
! "S_CONFIRM_ACTION" => append_sid("admin_styles.$phpEx"),
! "S_HIDDEN_FIELDS" => $hidden_fields)
! );
!
! $template->pparse("confirm");
!
! }
! else
! {
! //
! // The user has confirmed the delete. Remove the style, the style element names and update any users
! // who might be using this style
! //
! $sql = "DELETE FROM " . THEMES_TABLE . " WHERE themes_id = $style_id";
! if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
! {
! message_die(GENERAL_ERROR, "Could not remove style data!", "Error", __LINE__, __FILE__, $sql);
! }
!
! $sql = "DELETE FROM " . THEMES_NAME_TABLE . " WHERE themes_id = $style_id";
!
! // There may not be any theme name data so don't throw an error if the SQL dosan't work
! $db->sql_query($sql);
!
! $sql = "UPDATE " . USERS_TABLE . " SET user_style = " . $board_config['default_style'] . " WHERE user_style = $style_id";
! if(!$result = $db->sql_query($sql, END_TRANSACTION))
! {
! message_die(GENERAL_ERROR, "Could not update user style information", "Error", __LINE__, __FILE__, $sql);
! }
!
! message_die(GENERAL_MESSAGE, $lang['Style_removed'], $lang['Success']);
! }
!
!
! break;
! default:
!
! $sql = "SELECT themes_id, template_name, style_name FROM phpbb_themes ORDER BY template_name";
! if(!$result = $db->sql_query($sql))
! {
! message_die(GENERAL_ERROR, "Could not get style information!", "Error", __LINE__, __FILE__, $sql);
! }
!
! $style_rowset = $db->sql_fetchrowset($result);
!
! $template->set_filenames(array(
! "body" => "admin/styles_list_body.tpl")
! );
!
! $template->assign_vars(array("L_STYLES_TITLE" => $lang['Styles_admin'],
! "L_STYLES_TEXT" => $lang['Styles_explain'],
! "L_STYLE" => $lang['Style'],
! "L_TEMPLATE" => $lang['Template'],
! "L_EDIT" => $lang['Edit'],
! "L_DELETE" => $lang['Delete']));
!
! for($i = 0; $i < count($style_rowset); $i++)
! {
! $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $template->assign_block_vars("styles", array("ROW_CLASS" => $row_class,
! "ROW_COLOR" => $row_color,
! "STYLE_NAME" => $style_rowset[$i]['style_name'],
! "TEMPLATE_NAME" => $style_rowset[$i]['template_name'],
! "U_STYLES_EDIT" => append_sid("$PHP_SELF?mode=edit&style_id=" . $style_rowset[$i]['themes_id']),
! "U_STYLES_DELETE" => append_sid("$PHP_SELF?mode=delete&style_id=" . $style_rowset[$i]['themes_id'])));
! }
!
! $template->pparse("body");
!
!
! break;
! }
!
! if(!$HTTP_POST_VARS['send_file'])
! {
! include('page_footer_admin.'.$phpEx);
! }
?>
|
|
From: Nathan C. <na...@us...> - 2001-10-24 23:08:04
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv20231/includes
Modified Files:
bbcode.php
Log Message:
[quote=username] bbcode.
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** bbcode.php 2001/10/19 13:28:35 1.13
--- bbcode.php 2001/10/24 22:52:16 1.14
***************
*** 82,85 ****
--- 82,89 ----
$bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']);
+ $bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']);
+ $bbcode_tpl['quote_username_open'] = str_replace('{L_WROTE}', $lang['wrote'], $bbcode_tpl['quote_username_open']);
+ $bbcode_tpl['quote_username_open'] = str_replace('{USERNAME}', '\\1', $bbcode_tpl['quote_username_open']);
+
$bbcode_tpl['code_open'] = str_replace('{L_CODE}', $lang['Code'], $bbcode_tpl['code_open']);
***************
*** 163,166 ****
--- 167,172 ----
$text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text);
$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
+
+ $text = preg_replace("/\[quote:$uid=(.*?)\]/si", $bbcode_tpl['quote_username_open'], $text);
// [b] and [/b] for bolding text.
***************
*** 234,237 ****
--- 240,245 ----
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
+
+ $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(.*?)\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
// [list] and [list=x] for (un)ordered lists.
***************
*** 299,306 ****
* - every opening tag and closing tag must be of the [...] format.
*/
! function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_new, $mark_lowest_level, $func)
{
$open_tag_count = 0;
- $open_tag_length = array();
if (!$close_tag_new || ($close_tag_new == ''))
--- 307,313 ----
* - every opening tag and closing tag must be of the [...] format.
*/
! function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_new, $mark_lowest_level, $func, $open_regexp_replace = false)
{
$open_tag_count = 0;
if (!$close_tag_new || ($close_tag_new == ''))
***************
*** 324,333 ****
return $text;
}
!
! for ($i = 0; $i < count($open_tag); $i++)
! {
! ++$open_tag_count;
! $open_tag_length[$i] = strlen($open_tag[$i]);
! }
}
else
--- 331,335 ----
return $text;
}
! $open_tag_count = count($open_tag);
}
else
***************
*** 337,344 ****
$open_tag = array();
$open_tag[0] = $open_tag_temp;
- $open_tag_length[0] = strlen($open_tag[0]);
$open_tag_count = 1;
}
!
// Start at the 2nd char of the string, looking for opening tags.
--- 339,363 ----
$open_tag = array();
$open_tag[0] = $open_tag_temp;
$open_tag_count = 1;
}
!
! $open_is_regexp = false;
!
! if ($open_regexp_replace)
! {
! $open_is_regexp = true;
! if (!is_array($open_regexp_replace))
! {
! $open_regexp_temp = $open_regexp_replace;
! $open_regexp_replace = array();
! $open_regexp_replace[0] = $open_regexp_temp;
! }
! }
!
! if ($mark_lowest_level && $open_is_regexp)
! {
! message_die(GENERAL_ERROR, "Unsupported operation for bbcode_first_pass_pda().");
! }
!
// Start at the 2nd char of the string, looking for opening tags.
***************
*** 354,366 ****
// check if it's a starting or ending tag.
$found_start = false;
! $which_start_tag = -1;
for ($i = 0; $i < $open_tag_count; $i++)
{
! $possible_start = substr($text, $curr_pos, $open_tag_length[$i]);
! if (0 == strcasecmp($open_tag[$i], $possible_start))
{
! $found_start = true;
! $which_start_tag = $i;
! break;
}
}
--- 373,406 ----
// check if it's a starting or ending tag.
$found_start = false;
! $which_start_tag = "";
! $start_tag_index = -1;
for ($i = 0; $i < $open_tag_count; $i++)
{
! // Grab everything until the first "]"...
! $possible_start = substr($text, $curr_pos, strpos($text, "]", $curr_pos + 1) - $curr_pos + 1);
!
! // Now compare, either using regexp or not.
! if ($open_is_regexp)
! {
! $match_result = array();
! // PREG regexp comparison.
! if (preg_match($open_tag[$i], $possible_start, $match_result))
! {
! $found_start = true;
! $which_start_tag = $match_result[0];
! $start_tag_index = $i;
! break;
! }
! }
! else
{
! // straightforward string comparison.
! if (0 == strcasecmp($open_tag[$i], $possible_start))
! {
! $found_start = true;
! $which_start_tag = $open_tag[$i];
! $start_tag_index = $i;
! break;
! }
}
}
***************
*** 369,374 ****
{
// We have an opening tag.
! // Push its position and length on to the stack, and then keep going to the right.
! $match = array("pos" => $curr_pos, "tag" => $which_start_tag);
bbcode_array_push($stack, $match);
++$curr_pos;
--- 409,414 ----
{
// We have an opening tag.
! // Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
! $match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
bbcode_array_push($stack, $match);
++$curr_pos;
***************
*** 389,395 ****
$match = bbcode_array_pop($stack);
$start_index = $match['pos'];
! $which_start_tag = $match['tag'];
! $start_length = $open_tag_length[$which_start_tag];
! $start_tag = $open_tag[$which_start_tag];
// everything before the opening tag.
--- 429,440 ----
$match = bbcode_array_pop($stack);
$start_index = $match['pos'];
! $start_tag = $match['tag'];
! $start_length = strlen($start_tag);
! $start_tag_index = $match['index'];
!
! if ($open_is_regexp)
! {
! $start_tag = preg_replace($open_tag[$start_tag_index], $open_regexp_replace[$start_tag_index], $start_tag);
! }
// everything before the opening tag.
***************
*** 416,420 ****
else
{
! $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]";
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]";
}
--- 461,472 ----
else
{
! if ($open_is_regexp)
! {
! $text = $before_start_tag . $start_tag;
! }
! else
! {
! $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]";
! }
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]";
}
|
|
From: Nathan C. <na...@us...> - 2001-10-24 23:08:03
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv20231
Modified Files:
posting.php
Log Message:
[quote=username] bbcode.
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -r1.85 -r1.86
*** posting.php 2001/10/17 23:05:46 1.85
--- posting.php 2001/10/24 22:52:13 1.86
***************
*** 1933,1936 ****
--- 1933,1937 ----
$post_subject = $postrow['post_subject'];
$post_message = $postrow['post_text'];
+ $post_bbcode_uid = $postrow['bbcode_uid'];
if( $mode == "editpost" )
***************
*** 1945,1949 ****
}
! $post_message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
--- 1946,1950 ----
}
! $post_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
***************
*** 1960,1964 ****
$msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']);
! $post_message = $post_username . " " . $lang['wrote'] . ":\n\n[quote]\n" . $post_message . "\n[/quote]";
$mode = "reply";
--- 1961,1965 ----
$msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']);
! $post_message = "[quote=" . $post_username . "]\n" . $post_message . "\n[/quote]";
$mode = "reply";
|
|
From: Nathan C. <na...@us...> - 2001-10-24 23:08:03
|
Update of /cvsroot/phpbb/phpBB2/templates/Default
In directory usw-pr-cvs1:/tmp/cvs-serv20231/templates/Default
Modified Files:
bbcode.tpl
Log Message:
[quote=username] bbcode.
Index: bbcode.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/Default/bbcode.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** bbcode.tpl 2001/09/26 22:48:27 1.1
--- bbcode.tpl 2001/10/24 22:52:24 1.2
***************
*** 33,36 ****
--- 33,49 ----
<blockquote>
<!-- END quote_open -->
+ <!-- BEGIN quote_open -->
+ <table border="0" align="center" width="85%">
+ <tr>
+ <td>
+ <font size="-1">{USERNAME} {L_WROTE}:</font>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <font size="-1">
+ <blockquote>
+ <!-- END quote_open -->
<!-- BEGIN quote_close -->
</blockquote>
|
|
From: Nathan C. <na...@us...> - 2001-10-24 23:08:02
|
Update of /cvsroot/phpbb/phpBB2/templates/PSO
In directory usw-pr-cvs1:/tmp/cvs-serv20231/templates/PSO
Modified Files:
bbcode.tpl
Log Message:
[quote=username] bbcode.
Index: bbcode.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/PSO/bbcode.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** bbcode.tpl 2001/10/01 23:22:18 1.2
--- bbcode.tpl 2001/10/24 22:52:24 1.3
***************
*** 30,33 ****
--- 30,41 ----
<td><font size="-1"><blockquote>
<!-- END quote_open -->
+ <!-- BEGIN quote_username_open -->
+ <table width="85%" cellspacing="0" cellpadding="0" border="0" align="center">
+ <tr>
+ <td><font size="-1">{USERNAME} {L_WROTE}:</font><hr /></td>
+ </tr>
+ <tr>
+ <td><font size="-1"><blockquote>
+ <!-- END quote_username_open -->
<!-- BEGIN quote_close -->
</blockquote></font></td>
|
|
From: Nathan C. <na...@us...> - 2001-10-24 23:08:02
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv20231/language/lang_english Modified Files: lang_main.php Log Message: [quote=username] bbcode. Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** lang_main.php 2001/10/22 01:11:48 1.13 --- lang_main.php 2001/10/24 22:52:22 1.14 *************** *** 340,343 **** --- 340,345 ---- $lang['wrote'] = "wrote"; // proceeds the username and is followed by the quoted text + $lang['Quote'] = "Quote"; // comes before bbcode quote output. + $lang['Code'] = "Code"; // comes before bbcode code output. $lang['Stored'] = "Your message has been entered successfully"; *************** *** 968,972 **** $lang['smile_desc'] = "From this page you can add, remove and edit the emoticons or smileys your users can use in their posts and private messages."; $lang['smiley_config'] = "Smiley Configuration"; - $lang['Code'] = "Code"; $lang['Smile'] = "Smile"; $lang['Emotion'] = "Emotion"; --- 970,973 ---- |
|
From: Nathan C. <na...@us...> - 2001-10-24 23:08:02
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv20231/templates/subSilver
Modified Files:
bbcode.tpl
Log Message:
[quote=username] bbcode.
Index: bbcode.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/bbcode.tpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** bbcode.tpl 2001/10/02 12:09:12 1.5
--- bbcode.tpl 2001/10/24 22:52:24 1.6
***************
*** 18,26 ****
<!-- END listitem -->
<!-- BEGIN quote_open -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
! <td><span class="genmed"><b>Quote:</b></span></td>
</tr>
<tr>
--- 18,36 ----
<!-- END listitem -->
+ <!-- BEGIN quote_username_open -->
+ </span>
+ <table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
+ <tr>
+ <td><span class="genmed"><b>{USERNAME} {L_WROTE}:</b></span></td>
+ </tr>
+ <tr>
+ <td class="quote">
+ <!-- END quote_username_open -->
+
<!-- BEGIN quote_open -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
! <td><span class="genmed"><b>{L_QUOTE}:</b></span></td>
</tr>
<tr>
|
|
From: Bart v. B. <ba...@us...> - 2001-10-22 21:26:33
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv15666
Added Files:
upgrade.php
Log Message:
Development version of upgrade script. Still needs quite some work.
--- NEW FILE ---
<?php
/***************************************************************************
* upgrade.php
* -------------------
* begin : Wed Sep 05 2001
* copyright : (C) 2001 The phpBB Group
* email : su...@ph...
*
* $id upgrade_20.php,v 1.9 2001/03/23 01:32:41 psotfx Exp $
*
****************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
include('extension.inc');
include('config.'.$phpEx);
include('includes/constants.'.$phpEx);
include('includes/db.'.$phpEx);
include('includes/bbcode.'.$phpEx);
set_time_limit(20*60); // Increase maximum execution time to 20 minutes.
$months = array(
'Jan' => 1,
'Feb' => 2,
'Mar' => 3,
'Apr' => 4,
'May' => 5,
'Jun' => 6,
'Jul' => 7,
'Aug' => 8,
'Sep' => 9,
'Sept' => 9,
'Oct' => 10,
'Nov' => 11,
'Dec' => 12
);
function common_header()
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<HTML>
<HEAD>
<TITLE>phpBB - Database upgrade 1.4 to 2.0</TITLE>
</HEAD>
<BODY BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#11C6BD" VLINK="#11C6BD">
<?
return;
}
function query($sql, $errormsg)
{
global $db;
if(!$result = $db->sql_query($sql))
{
print "<br><font color=\"red\">\n";
print "$errormsg<br>";
$sql_error = $db->sql_error();
print $sql_error['code'] .": ". $sql_error['message']. "<br>\n";
print "<pre>$sql</pre>";
print "</font>\n";
return FALSE;
}
else
{
return $result;
}
}
function common_footer()
{
?>
</BODY>
</HTML>
<?
return;
}
function get_schema()
{
$schemafile = file('db/mysql_schema.sql');
$tabledata = 0;
$pattern = "/^\s*(\w+)\s+(\w+)\((\d+)\)(.*)$/";
for($i=0; $i < count($schemafile); $i++)
{
$line = $schemafile[$i];
if(preg_match("/^CREATE TABLE (\w+)/i", $line, $matches))
{
$tabledata = 1;
$table = $matches[1];
$table_def[$table] = $line;
continue;
}
if(preg_match("/^\);/", $line))
{
$tabledata = 0;
$table_def[$table] .= ")"; // We don't need the closing semicolon
}
if($tabledata == 1)
{
$table_def[$table] .= $line;
preg_match($pattern, $line, $matches);
$i%2 == 1 ? $color = "#FF0000" : $color = "#0000FF";
$field = $matches[1];
$type = $matches[2];
$size = $matches[3];
preg_match("/DEFAULT (NULL|\'.*?\')[,\s](.*)$/i", $matches[4], $match);
$default = $match[1];
preg_match("/NOT NULL/i", $matches[4]) ? $notnull = 1 : $notnull =0;
preg_match("/auto_increment/i", $matches[4]) ? $auto_increment = 1 : $auto_increment =0;
/*
print "<font color = $color>\n";
print "$line<br>\n";
print "$field $type($size)";
if (isset($default)){
print " DEFAULT $default";
}
if ($notnull == 1)
{
print " NOT NULL";
}
if ($auto_increment == 1)
{
print " auto_increment";
}
print "<br>\n";
print "<font>\n";
*/
$field_def[$table][$field] = array(
'type' => $type,
'size' => $size,
'default' => $default,
'notnull' => $notnull,
'auto_increment' => $auto_increment
);
}
}
/*
print "<pre>";
print_r($schema);
print "</pre>";
*/
$schema['field_def'] = $field_def;
$schema['table_def'] = $table_def;
return $schema;
}
function get_inserts()
{
$insertfile = file("db/mysql_basic.sql");
for($i=0; $i < count($insertfile); $i++)
{
if (preg_match("/^(.*INSERT INTO (.*?)\s.*);$/i", $insertfile[$i], $matches))
{
$returnvalue[$matches[2]][] = $matches[1];
}
}
return $returnvalue;
}
function lock_tables($state, $tables= '')
{
if($state == 1)
{
if(is_array($tables))
{
$tables = join(' WRITE, ', $tables);
}
$sql = "LOCK TABLES $tables WRITE";
query($sql, "Couldn't do: $sql");
}
else
{
query("UNLOCK TABLES", "Couldn't unlock all tables");
}
}
function output_table_content($content){
echo $content."\n";
return;
}
//
// Nathan's bbcode2 conversion routines
//
function bbdecode($message) {
// Undo [code]
$code_start_html = "<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>";
$code_end_html = "</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->";
$message = str_replace($code_start_html, "[code]", $message);
$message = str_replace($code_end_html, "[/code]", $message);
// Undo [quote]
$quote_start_html = "<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>";
$quote_end_html = "</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->";
$message = str_replace($quote_start_html, "[quote]", $message);
$message = str_replace($quote_end_html, "[/quote]", $message);
// Undo [b] and [i]
$message = preg_replace("#<!-- BBCode Start --><B>(.*?)</B><!-- BBCode End -->#s", "[b]\\1[/b]", $message);
$message = preg_replace("#<!-- BBCode Start --><I>(.*?)</I><!-- BBCode End -->#s", "[i]\\1[/i]", $message);
// Undo [url] (long form)
$message = preg_replace("#<!-- BBCode u2 Start --><A HREF=\"([a-z]+?://)(.*?)\" TARGET=\"_blank\">(.*?)</A><!-- BBCode u2 End -->#s", "[url=\\1\\2]\\3[/url]", $message);
// Undo [url] (short form)
$message = preg_replace("#<!-- BBCode u1 Start --><A HREF=\"([a-z]+?://)(.*?)\" TARGET=\"_blank\">(.*?)</A><!-- BBCode u1 End -->#s", "[url]\\3[/url]", $message);
// Undo [email]
$message = preg_replace("#<!-- BBCode Start --><A HREF=\"mailto:(.*?)\">(.*?)</A><!-- BBCode End -->#s", "[email]\\1[/email]", $message);
// Undo [img]
$message = preg_replace("#<!-- BBCode Start --><IMG SRC=\"(.*?)\" BORDER=\"0\"><!-- BBCode End -->#s", "[img]\\1[/img]", $message);
// Undo lists (unordered/ordered)
// <li> tags:
$message = str_replace("<!-- BBCode --><LI>", "[*]", $message);
// [list] tags:
$message = str_replace("<!-- BBCode ulist Start --><UL>", "[list]", $message);
// [list=x] tags:
$message = preg_replace("#<!-- BBCode olist Start --><OL TYPE=([A1])>#si", "[list=\\1]", $message);
// [/list] tags:
$message = str_replace("</UL><!-- BBCode ulist End -->", "[/list]", $message);
$message = str_replace("</OL><!-- BBCode olist End -->", "[/list]", $message);
return($message);
}
//
// Alternative for in_array() which is only available in PHP4
//
function inarray($needle, $haystack) {
for( $i=0 ; $i < sizeof($haystack) ; $i++ )
{
if($haystack[$i]==$needle)
{
return true;
break;
}
else
{
$value=false;
}
}
return $value;
}
function end_step($next)
{
global $debug;
if(!isset($debug))
{
// Print out link to next step and wait only if we are not debugging.
print "<br><a href=\"$PHP_SELF?next=$next\">Next step: $next</a><br>\n";
break;
}
else
{
print "<HR>Next step: $next<p>\n";
}
}
//
// End function defns
///////////////////////////////////////////////////////////////////////////////
?>
<?php
// Start at the beginning if the user hasn't specified a specific starting point.
if(!isset($next)) $next = 'start';
// If debug is set we'll do all steps in one go.
$debug=1;
if(isset($next))
{
switch($next)
{
case 'start':
case 'cleanstart':
$sql = "DROP TABLE sessions";
query($sql, "Couldn't drop table 'sessions'");
end_step('rename_tables');
case 'rename_tables':
common_header();
echo "<H2>Step 2: Rename tables</H2>\n";
$newnames = array(
"banlist" => "banlist",
"catagories" => "categories",
// Don't rename config yet, we'll create a new one and merge those later.
//"config" => "config",
"forums" => "forums",
"disallow" => "disallow",
"posts" => "posts",
"posts_text" => "posts_text",
"priv_msgs" => "privmsgs",
"ranks" => "ranks",
"sessions" => "sessions",
"smiles" => "smilies",
"topics" => "topics",
"users" => "users",
"words" => "words"
);
while(list($old, $new) = each($newnames))
{
$new = $table_prefix . $new;
$sql = "ALTER TABLE $old RENAME $new";
if(!$result = $db->sql_query($sql))
{
echo "Couldn't rename '$old' to '$new'<br>\n";
$sql_error = $db->sql_error();
print $sql_error['code'] .": ". $sql_error['message']. "<br>\n";
}
else
{
print "Renamed '$old' to '$new'<br>\n";
}
}
common_footer();
end_step('create_tables');
case 'create_tables':
common_header();
echo "<H2>Step 2: Create new phpBB2 tables</H2>\n";
$schema = get_schema();
$table_def = $schema['table_def'];
$field_def = $schema['field_def'];
// Create array with tables in 'old' database
$sql = 'SHOW TABLES';
if(!$result = $db->sql_query($sql))
{
echo "Couldn't get list of current tables<br>\n";
$sql_error = $db->sql_error();
print $sql_error['code'] .": ". $sql_error['message']. "<br>\n";
}
while ($table = $db->sql_fetchrow($result))
{
$currenttables[] = $table[0];
}
// Check what tables we need to CREATE
while (list($table, $definition) = each ($table_def))
{
if (!inarray($table, $currenttables))
{
print "Creating $table: ";
if(!$result = $db->sql_query($definition))
{
echo "Couldn't create table<br>\n";
$sql_error = $db->sql_error();
print $sql_error['code'] .": ". $sql_error['message']. "<br>\n";
print $definition . "<br>\n";
}
else
{
print "OK<br>\n";
}
}
}
common_footer();
end_step('create_config');
case 'create_config':
common_header();
$inserts = get_inserts();
print "Inserting new values into new layout config table";
while(list($table, $inserts_table) = each($inserts))
{
if ($table == CONFIG_TABLE)
{
while(list($nr, $insert) = each($inserts_table))
{
query($insert, "Couldn't insert value into config table");
print ".";
}
print "<br>";
}
}
//end_step('convert_config');
case 'convert_config':
common_header();
print "Starting!<br>";
$sql = "SELECT * FROM config";
$result = query($sql, "Couldn't get info from old config table");
$oldconfig = $db->sql_fetchrow($result);
while(list($name, $value) = each($oldconfig))
{
if(is_int($name))
{
continue;
}
print "Updating $name...<br>\n";
$sql = "UPDATE ".CONFIG_TABLE."
SET config_value = '".stripslashes($value)."'
WHERE config_name = '$name'";
query($sql, "Couldn't update config table with values from old config table");
}
end_step('droptables');
case 'droptables':
//drop access, whosonline, sessions (recreate)
echo "Nothing here yet<br>\n";
end_step('convert_ip_date');
case 'convert_ip_date':
common_header();
$names[POSTS_TABLE]['poster_ip'] = 'ip';
$names[POSTS_TABLE]['post_time'] = 'date';
$names[TOPICS_TABLE]['topic_time'] = 'date';
$names[PRIVMSGS_TABLE]['poster_ip'] = 'ip';
$names[PRIVMSGS_TABLE]['msg_time'] = 'date';
lock_tables(1, array(POSTS_TABLE, TOPICS_TABLE, PRIVMSGS_TABLE));
while(list($table, $fields) = each($names))
{
while(list($field, $type) = each($fields))
{
print "Converting $type format of $field in $table...<br>\n";
flush();
$function = ($type == 'ip') ? 'INET_ATON' : 'UNIX_TIMESTAMP';
$sql = "UPDATE $table SET $field = $function($field)";
query($sql, "Couldn't convert $type format of $table($field)");
}
}
lock_tables(0);
common_footer();
end_step('fix_addslashes');
case 'fix_addslashes':
$slashfields[TOPICS_TABLE] = array('topic_title');
$slashfields[FORUMS_TABLE] = array('forum_desc');
$slashfields[CATEGORIES_TABLE] = array('cat_title');
$slashfields[WORDS_TABLE] = array('word', 'replacement');
$slashfields[RANKS_TABLE] = array('rank_title');
//convert smilies?
$slashes = array(
"\\'" => "'",
"\\\"" => "\"",
"\\\\" => "\\");
$slashes = array(
"\\'" => "'",
"\\\"" => "\"",
"\\\\" => "\\");
lock_tables(1, array(TOPICS_TABLE, FORUMS_TABLE, CATEGORIES_TABLE, WORDS_TABLE, RANKS_TABLE));
while(list($table, $fields) = each($slashfields))
{
print "Removing slashes from $table table.<br>\n";
flush();
while(list($nr, $field) = each($fields))
{
reset($slashes);
while(list($search, $replace) = each($slashes))
{
$sql = "UPDATE $table SET $field = REPLACE($field, '".addslashes($search)."', '".addslashes($replace)."')";
query($sql, "Couldn't remove extraneous slashes from the old data.");
}
}
}
lock_tables(0);
end_step('convert_users');
case 'convert_users':
$sql = "
SELECT
count(*) as total,
max(user_id) as maxid
FROM ". USERS_TABLE;
$result = query($sql, "Couldn't get max post_id.");
$maxid = $db->sql_fetchrow($result);
$totalposts = $maxid['total'];
$maxid = $maxid['maxid'];
$sql = "ALTER TABLE ".USERS_TABLE."
ADD user_sig_bbcode_uid CHAR(10),
MODIFY user_sig text";
query($sql, "Couldn't add user_sig_bbcode_uid field to users table");
$batchsize = 1000;
print "Going to convert BBcode and registration dates in User table.<br>\n";
flush();
for($i = 0; $i <= $maxid; $i += $batchsize)
{
$batchstart = $i + 1;
$batchend = $i + $batchsize;
print "Converting Users $batchstart to $batchend<br>\n";
flush();
$sql = "SELECT * from ". USERS_TABLE. " WHERE user_id BETWEEN $batchstart AND $batchend";
$result = query($sql, "Couldn't get ". USERS_TABLE .".user_id $batchstart to $batchend");
$checklength = array(
'user_occ',
'user_website',
'user_email',
'user_from',
'user_intrest',
'user_aim',
'user_yim',
'user_msnm');
lock_tables(1, USERS_TABLE);
while($row = mysql_fetch_array($result))
{
if(is_int($row['user_regdate']))
{
// We already converted this post to the new style BBcode, skip this post.
continue;
}
//
// Nathan's bbcode2 conversion
//
// undo 1.2.x encoding..
$row['user_sig'] = bbdecode(stripslashes($row['user_sig']));
$row['user_sig'] = undo_make_clickable($row['user_sig']);
$row['user_sig'] = str_replace("<BR>", "\n", $row['user_sig']);
// make a uid
$uid = make_bbcode_uid();
// do 2.x first-pass encoding..
$row['user_sig'] = bbencode_first_pass($row['user_sig'], $uid);
$row['user_sig'] = addslashes($row['user_sig']);
// Check for invalid info like '-' and '?' for a lot of fields
reset($checklength);
while($field = each($checklength))
{
$row[$field[1]] = strlen($row[$field[1]]) < 3 ? '' : $row[$field[1]];
}
preg_match('/(.*?) (\d{1,2}), (\d{4})/', $row['user_regdate'], $parts);
$row['user_regdate'] = mktime(0,0,0,$months[$parts[1]], $parts[2], $parts[3]);
$website = $row['user_website'];
if(substr(strtolower($website), 0, 7) != "http://")
{
$website = "http://" . $website;
}
if(strtolower($website) == 'http://'){
$website = '';
}
$row['user_website'] = addslashes($website);
$row['user_icq'] = (ereg("^[0-9]+$", $row['user_icq'])) ? $row['user_icq'] : '';
reset($checklength);
while($field = each($checklength))
{
if(strlen($row[$field[1]]) < 3)
{
$row[$field[1]] = '';
}
$row[$field[1]] = addslashes($row[$field[1]]);
}
switch($row['user_level'])
{
case '4':
$row['user_level'] = ADMIN;
break;
case '-1':
$row['user_level'] = ANONYMOUS;
break;
default:
$row['user_level'] = USER;
}
$sql = "UPDATE ".USERS_TABLE."
SET
user_sig = '".$row['user_sig']."',
user_sig_bbcode_uid = '$uid',
user_regdate = '".$row['user_regdate']."',
user_website = '".$row['user_website']."',
user_occ = '".$row['user_occ']."',
user_email = '".$row['user_email']."',
user_from = '".$row['user_from']."',
user_intrest = '".$row['user_intrest']."',
user_aim = '".$row['user_aim']."',
user_yim = '".$row['user_yim']."',
user_msnm = '".$row['user_msnm']."'
WHERE user_id = ".$row['user_id'];
query($sql, "Couldn't update ".USERS_TABLE." table with new BBcode and regdate for user_id ".$row['user_id']);
}
lock_tables(0);
}
end_step('convert_posts');
case 'convert_posts':
common_header();
$sql = "ALTER TABLE ".POSTS_TABLE."
ADD bbcode_uid char(10) NOT NULL,
ADD enable_sig tinyint(1) DEFAULT '1' NOT NULL";
print "Adding bbcode_uid field to ".POSTS_TABLE.".<br>\n";
$result = query($sql, "Couldn't get add bbcode_uid field to ".POSTS_TABLE.".");
$sql = "
SELECT
count(*) as total,
max(post_id) as maxid
FROM ". POSTS_TEXT_TABLE;
$result = query($sql, "Couldn't get max post_id.");
$maxid = $db->sql_fetchrow($result);
$totalposts = $maxid['total'];
$maxid = $maxid['maxid'];
$batchsize = 2000;
print "Going to convert BBcode in posts with $batchsize messages at a time and $totalposts in total.<br>\n";
for($i = 0; $i <= $maxid; $i += $batchsize)
{
$batchstart = $i + 1;
$batchend = $i + $batchsize;
print "Converting BBcode in post number $batchstart to $batchend<br>\n";
flush();
$sql = "
SELECT
pt.*,
p.bbcode_uid
FROM "
.POSTS_TEXT_TABLE." pt,"
.POSTS_TABLE." p
WHERE pt.post_id = p.post_id
&& pt.post_id BETWEEN $batchstart AND $batchend";
$result = query($sql, "Couldn't get ". POSTS_TEXT_TABLE .".post_id $batchstart to $batchend");
lock_tables(1, array(POSTS_TABLE, POSTS_TEXT_TABLE));
while($row = mysql_fetch_array($result))
{
if($row['bbcode_uid'] != '')
{
// We already converted this post to the new style BBcode, skip this post.
continue;
}
//
// Nathan's bbcode2 conversion
//
// undo 1.2.x encoding..
$row['post_text'] = bbdecode(stripslashes($row['post_text']));
$row['post_text'] = undo_make_clickable($row['post_text']);
$row['post_text'] = str_replace("<BR>", "\n", $row['post_text']);
// make a uid
$uid = make_bbcode_uid();
// do 2.x first-pass encoding..
$row['post_text'] = bbencode_first_pass($row['post_text'], $uid);
$row['post_text'] = addslashes($row['post_text']);
$checksig = preg_replace('/\[addsig\]$/', '', $row['post_text']);
if(strlen($checksig) == strlen($row['post_text']))
{
$enable_sig = 0;
}
else
{
$enable_sig = 1;
}
$sql = "UPDATE ".POSTS_TEXT_TABLE."
SET post_text = '$checksig'
WHERE post_id = ".$row['post_id'];
query($sql, "Couldn't update ".POSTS_TEXT_TABLE." table with new BBcode for post_id ".$row['post_id']);
$sql = "UPDATE ".POSTS_TABLE."
SET bbcode_uid = '$uid', enable_sig = $enable_sig
WHERE post_id = ".$row['post_id'];
query($sql, "Couldn't update ".POSTS_TABLE." table with bbcode_uid of post_id ".$row['post_id']);
}
lock_tables(0);
}
end_step('convert_pm');
case 'convert_pm':
$sql = "
SELECT
count(*) as total,
max(msg_id) as maxid
FROM ". PRIVMSGS_TABLE;
$result = query($sql, "Couldn't get max privmsgs_id.");
$maxid = $db->sql_fetchrow($result);
$totalposts = $maxid['total'];
$maxid = $maxid['maxid'];
$sql = "ALTER TABLE ".PRIVMSGS_TABLE."
ADD privmsgs_subject VARCHAR(255),
ADD privmsgs_attach_sig TINYINT(1) DEFAULT 1";
query($sql, "Couldn't add privmsgs_subject field to ".PRIVMSGS_TABLE." table");
$batchsize = 2000;
print "Going to convert Private messsages with $batchsize messages at a time and $totalposts in total.<br>\n";
for($i = 0; $i <= $maxid; $i += $batchsize)
{
$batchstart = $i + 1;
$batchend = $i + $batchsize;
print "Converting Private Message number $batchstart to $batchend<br>\n";
flush();
$sql = "
SELECT
*
FROM "
.PRIVMSGS_TABLE."
WHERE
msg_id BETWEEN $batchstart AND $batchend";
$result = query($sql, "Couldn't get ". POSTS_TEXT_TABLE .".post_id $batchstart to $batchend");
lock_tables(1, array(PRIVMSGS_TABLE, PRIVMSGS_TEXT_TABLE));
while($row = mysql_fetch_array($result))
{
if($row['msg_text'] == NULL)
{
// We already converted this post to the new style BBcode, skip this post.
continue;
}
//
// Nathan's bbcode2 conversion
//
// undo 1.2.x encoding..
$row['msg_text'] = bbdecode(stripslashes($row['msg_text']));
$row['msg_text'] = undo_make_clickable($row['msg_text']);
$row['msg_text'] = str_replace("<BR>", "\n", $row['msg_text']);
// make a uid
$uid = make_bbcode_uid();
// do 2.x first-pass encoding..
$row['msg_text'] = bbencode_first_pass($row['msg_text'], $uid);
$checksig = preg_replace('/\[addsig\]$/', '', $row['msg_text']);
if(strlen($checksig) == strlen($row['msg_text']))
{
$enable_sig = 0;
}
else
{
$enable_sig = 1;
}
$row['msg_text'] = $checksig;
if($row['msg_status'] == 1)
{
// Private message has been read
$row['msg_status'] = PRIVMSGS_SAVED_IN_MAIL;
}
else
{
// Private message is new
$row['msg_status'] = PRIVMSGS_NEW_MAIL;
}
// Subject contains first 60 characters of msg
$subject = addslashes(strip_tags(substr($row['msg_text'], 0, 60)));
$row['msg_text'] = addslashes($row['msg_text']);
$sql = "INSERT INTO ".PRIVMSGS_TEXT_TABLE."
(privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
VALUES
('".$row['msg_id']."', '$uid', '".$row['msg_text']."')";
query($sql, "Couldn't insert PrivMsg text into ".PRIVMSGS_TEXT_TABLE." table msg_id ".$row['msg_id']);
$sql = "UPDATE ".PRIVMSGS_TABLE."
SET
msg_text = NULL,
msg_status = ".$row['msg_status'].",
privmsgs_subject = '$subject',
privmsgs_attach_sig = $enable_sig
WHERE msg_id = ".$row['msg_id'];
query($sql, "Couldn't update ".PRIVMSGS_TABLE." table for msg_id ".$row['post_id']);
}
}
lock_tables(0);
end_step('update_schema');
case 'update_schema':
common_header();
$rename =
array(
$table_prefix."users" => array(
"user_interest" => "user_intrest",
"user_allowsmile" => "user_desmile",
"user_allowhtml" => "user_html",
"user_allowbbcode" => "user_bbcode"
),
$table_prefix."privmsgs" => array(
"privmsgs_id" => "msg_id",
"privmsgs_from_userid" => "from_userid",
"privmsgs_to_userid" => "to_userid",
"privmsgs_date" => "msg_time",
"privmsgs_ip" => "poster_ip",
"privmsgs_type" => "msg_status"
),
$table_prefix."smilies" => array(
"smilies_id" => "id"
)
);
$schema = get_schema();
$table_def = $schema['table_def'];
$field_def = $schema['field_def'];
//print "<pre>";
//print_r($field_def);
//print "</pre>";
// Loop tables in schema
while (list($table, $table_def) = each($field_def))
{
// Loop fields in table
print "<p>Table: $table<br>\n";
flush();
$sql = "SHOW FIELDS FROM $table";
$result = query($sql, "Can't get definition of current $table table");
$current_def = $db->sql_fetchrowset($result);
while(list($nr, $def) = each($current_def))
{
$current_fields[] = $def['Field'];
}
//print_r($current_fields);
$alter_sql = "ALTER TABLE $table ";
while (list($field, $definition) = each($table_def))
{
if ($field == '')
{
// Skip empty fields if any (shouldn't be needed)
continue;
}
$type = $definition['type'];
$size = $definition['size'];
$default = isset($definition['default']) ? "DEFAULT " . $definition['default'] : '';
$notnull = $definition['notnull'] == 1 ? 'NOT NULL' : '';
$auto_increment = $definition['auto_increment'] == 1 ? 'auto_increment' : '';
$oldfield = isset($rename[$table][$field]) ? $rename[$table][$field] : $field;
if(!inarray($field, $current_fields) && $oldfield == $field)
{
// If the current is not a key of $current_def and it is not a field that is
// to be renamed then the field doesn't currently exist.
$changes[] = "\nADD $field $type($size) $default $notnull $auto_increment ";
}
else
{
$changes[] = "\nCHANGE $oldfield $field $type($size) $default $notnull $auto_increment";
}
}
$alter_sql .= join(',', $changes);
unset($changes);
unset($current_fields);
print "$alter_sql<br>\n";
query($alter_sql, "Couldn't alter table $table");
flush();
}
end_step('insert_themes');
case 'insert_themes':
common_header();
$inserts = get_inserts();
print "Inserting new values into new themes table";
while(list($table, $inserts_table) = each($inserts))
{
if ($table == THEMES_TABLE)
{
while(list($nr, $insert) = each($inserts_table))
{
query($insert, "Couldn't insert value into ".THEMES_TABLE);
print ".";
}
print "<br>";
}
}
//end_step('convert_config');
echo "This is the end....";
break;
}
}
?>
|
|
From: James A. <th...@us...> - 2001-10-22 01:11:50
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv26013/language/lang_english Modified Files: lang_main.php Log Message: Fixed bug in profile where account reactivation email had wrong link Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** lang_main.php 2001/10/16 23:34:45 1.12 --- lang_main.php 2001/10/22 01:11:48 1.13 *************** *** 504,507 **** --- 504,509 ---- $lang['Profile_updated'] = "Your profile has been updated"; + $lang['Profile_updated_inactive'] = "Your profile has been updated, however you have changed vital details thus your account is now inactive. Check your email to find out how to reactivate your account, or if admin activation is require wait for the administrator to reactivate your account"; + $lang['to_return_index'] = "to return to the index"; *************** *** 1115,1118 **** --- 1117,1129 ---- $lang['add_disallow_explain'] = "You can disallow a username using the wildcard character '*' to match any character"; $lang['no_disallowed'] = "No Disallowed Usernames"; + + // + // Styles Admin + // + $lang['Styles_admin'] = "Styles Administration"; + $lang['Styles_explain'] = "In this panel you can edit or remove styles from your forum. To import a new styles click on 'Add New' in the left hand panel, to create a new styles click on 'Create New'"; + $lang['Style'] = "Style"; + $lang['Template'] = "Template"; + // |