aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/language/en/lang_main.php114
-rw-r--r--phpBB/templates/subSilver/ucp_main.html190
-rw-r--r--phpBB/templates/subSilver/ucp_prefs.html48
-rw-r--r--phpBB/templates/subSilver/ucp_profile.html18
-rwxr-xr-xphpBB/ucp.php13
-rw-r--r--phpBB/ucp/ucp_main.php410
-rw-r--r--phpBB/ucp/ucp_profile.php4
-rw-r--r--phpBB/viewforum.php8
-rw-r--r--phpBB/viewtopic.php12
10 files changed, 515 insertions, 304 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c530328658..b5a37e6bb3 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1287,7 +1287,7 @@ function page_header($page_title = '')
'U_INDEX' => 'index.'.$phpEx.$SID,
'U_SEARCH' => 'search.'.$phpEx.$SID,
'U_REGISTER' => 'ucp.'.$phpEx.$SID.'&mode=register',
- 'U_PROFILE' => 'ucp.'.$phpEx.$SID.'&mode=editprofile',
+ 'U_PROFILE' => 'ucp.'.$phpEx.$SID,
'U_MODCP' => 'mcp.'.$phpEx.$SID,
'U_FAQ' => 'faq.'.$phpEx.$SID,
'U_SEARCH_SELF' => 'search.'.$phpEx.$SID.'&search_id=egosearch',
diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php
index f73c482d17..bec8a5b55d 100644
--- a/phpBB/language/en/lang_main.php
+++ b/phpBB/language/en/lang_main.php
@@ -628,39 +628,36 @@ $lang = array(
'UCP' => 'User Control Panel',
+ 'UCP_OPTIONS' => 'Options',
- 'UCP_Priv_messages' => 'Private Messages',
- 'SUBSCRIBED_TOPICS' => 'Subscribed Topics',
- 'SUBSCRIBED_FORUMS' => 'Subscribed Forums',
- 'WELCOME_USERCP' => 'Welcome to your User Control Panel',
- 'UCP_WELCOME_MESSAGE' => 'This is the UCP welcome message some text should go here that says something usefull, however I can\'t for the life of me think of anything to put so if someone coudl come up with something that would be great. Thanks.',
- 'BUDDY_LIST' => 'Buddy List',
- 'ONLINE_BUDDIES' => 'Buddies Currently Online',
- 'UNREAD_PM' => 'Unread PMs',
-
- 'Registration_information' => 'Registration Information',
- 'Preferances' => 'Preferances',
- 'Avatar_settings' => 'Avatar Settings',
- 'Signature_settings' => 'Signature Settings',
'UCP_MAIN' => 'Overview',
- 'UCP_PREFERENCES' => 'Preferences',
- 'UCP_PERSONAL' => 'Personal Settings',
- 'UCP_VIEW' => 'Viewing Posts',
- 'UCP_POST' => 'Posting Messages',
+ 'UCP_FRONT' => 'Front page',
+ 'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
+ 'IMPORTANT_NEWS'=> 'Important announcements',
+ 'YOUR_DETAILS' => 'Your activity',
+ 'ONLINE_BUDDIES'=> 'Online Buddies',
+ 'UNREAD_NO_PM' => 'You have no unread private messages',
+ 'UNREAD_PM' => 'You have 1 unread private messages',
+ 'UNREAD_PMS' => 'You have $d unread private messages',
+ 'TOTAL_NO_PM' => '0 private messages in total',
+ 'TOTAL_PM' => '1 private messages in total',
+ 'TOTAL_PMS' => '$d private messages in total',
-
- 'UCP_MESSAGING' => 'Private Messaging',
+ 'UCP_WATCHED' => 'Watched items',
+ 'WATCHED_FORUMS' => 'Watched Forums',
+ 'WATCHED_TOPICS' => 'Watched Topics',
+ 'NO_WATCHED_FORUMS' => 'You are not watching any forums.',
+ 'NO_WATCHED_TOPICS' => 'You are not watching any topics.',
- 'UCP_LISTS' => 'Buddy/Ignore Lists',
+ 'UCP_PROFILE' => 'Profile',
- 'UCP_PROFILE' => 'Your Profile',
'UCP_REG_DETAILS' => 'Registration details',
- 'UCP_AVATAR' => 'Your avatar',
+ 'UCP_PROFILE_INFO' => 'Your Profile',
'PROFILE_INFO_NOTICE' => 'Please note that this information will be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.',
'WEBSITE' => 'Website',
'LOCATION' => 'Location',
@@ -682,31 +679,7 @@ $lang = array(
'SIGNATURE_EXPLAIN' => 'This is a block of text that can be added to posts you make. There is a %d character limit',
'SIGNATURE_TOO_LONG'=> 'Your signature is too long.',
-
- 'No_user_id_specified' => 'Sorry but that user does not exist',
- 'Wrong_Profile' => 'You cannot modify a profile that is not your own.',
- 'Only_one_avatar' => 'Only one type of avatar can be specified',
- 'File_no_data' => 'The file at the URL you gave contains no data',
- 'No_connection_URL' => 'A connection could not be made to the URL you gave',
- 'Incomplete_URL' => 'The URL you entered is incomplete',
- 'Wrong_remote_avatar_format' => 'The URL of the remote avatar is not valid',
- 'No_send_account_inactive' => 'Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information',
- 'Always_smile' => 'Always enable Smilies',
- 'Always_html' => 'Always allow HTML',
- 'Always_bbcode' => 'Always allow BBCode',
- 'Always_add_sig' => 'Always attach my signature',
- 'Always_notify' => 'Always notify me of replies',
- 'Always_notify_explain' => 'Sends an email when someone replies to a topic you have posted in. This can be changed whenever you post',
- 'Board_style' => 'Board Style',
- 'DEFAULT_STYLE' => 'Default style',
- 'No_themes' => 'No Themes In database',
-
-
- 'Date_format' => 'Date format',
- 'Date_format_explain' => 'The syntax used is identical to the PHP <a href=\"http://www.php.net/date\" target=\"_other\">date()</a> function',
-
- 'Public_view_email' => 'Always show my Email Address',
-
+ 'UCP_AVATAR' => 'Your avatar',
'AVATAR' => 'Avatar',
'AVATAR_EXPLAIN' => 'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, a height no greater than %d pixels and a file size no more than %dkB.',
'DELETE_AVATAR' => 'Delete Image',
@@ -719,16 +692,55 @@ $lang = array(
'AVATAR_URL' => 'URL of Avatar Image',
'AVATAR_GALLERY' => 'Select from gallery',
'SHOW_GALLERY' => 'Show gallery',
+
+
+ 'UCP_PREFERENCES' => 'Preferences',
+
+ 'UCP_PERSONAL' => 'Personal Settings',
+ 'HIDE_ONLINE' => 'Hide my online status',
+ 'NOTIFY_ON_PM' => 'Email me on new private messages',
+ 'POPUP_ON_PM' => 'Pop up window on new private message',
+ 'SHOW_EMAIL' => 'Users can contact me by email',
+ 'BOARD_STYLE' => 'My board style',
+ 'BOARD_LANGUAGE' => 'My language',
+ 'BOARD_TIMEZONE' => 'My timezone',
+ 'BOARD_DST' => 'Daylight Saving Time is in effect',
+ 'BOARD_DATE_FORMAT' => 'My date format',
+ 'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href=\"http://www.php.net/date\" target=\"_other\">date()</a> function',
+
+ 'UCP_VIEW' => 'Viewing Posts',
+
+ 'UCP_POST' => 'Posting Messages',
+ 'DEFAULT_SMILE' => 'Enable smilies by default',
+ 'DEFAULT_HTML' => 'Enable HTML by default',
+ 'DEFAULT_BBCODE' => 'Enable BBCode by default',
+ 'DEFAULT_ADD_SIG' => 'Attach my signature by default',
+ 'DEFAULT_NOTIFY' => 'Notify me upon replies by default',
+
+
+ 'UCP_MESSAGING' => 'Private Messaging',
+
+
+ 'UCP_LISTS' => 'Buddy/Ignore Lists',
+
+
+ 'No_user_id_specified' => 'Sorry but that user does not exist',
+ 'Wrong_Profile' => 'You cannot modify a profile that is not your own.',
+ 'Only_one_avatar' => 'Only one type of avatar can be specified',
+ 'File_no_data' => 'The file at the URL you gave contains no data',
+ 'No_connection_URL' => 'A connection could not be made to the URL you gave',
+ 'Incomplete_URL' => 'The URL you entered is incomplete',
+ 'Wrong_remote_avatar_format' => 'The URL of the remote avatar is not valid',
+ 'No_send_account_inactive' => 'Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information',
+
+
+
'Select_avatar' => 'Select avatar',
'Return_profile' => 'Cancel avatar',
'Select_category' => 'Select category',
- 'Notify_on_privmsg' => 'Notify on new Private Message',
- 'Popup_on_privmsg' => 'Pop up window on new Private Message',
- 'Popup_on_privmsg_explain' => 'Some templates may open a new window to inform you when new private messages arrive',
- 'Hide_user' => 'Hide your online status',
'Profile_updated' => 'Your profile has been updated',
'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',
diff --git a/phpBB/templates/subSilver/ucp_main.html b/phpBB/templates/subSilver/ucp_main.html
index 2c06042922..2f9b66f579 100644
--- a/phpBB/templates/subSilver/ucp_main.html
+++ b/phpBB/templates/subSilver/ucp_main.html
@@ -1,75 +1,127 @@
<!-- INCLUDE ucp_header.html -->
<tr>
- <th colspan="3">{L_UCP}</th>
- </tr>
- <tr>
- <td width="30%" align="left" valign="top">
- <table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF">
- <tr>
- <td class="cat" colspan="3" height="28"><span class="cattitle">{L_SUBSCRIBED_TOPICS}</span></td>
- </tr>
- <!-- BEGIN subscribed_topics -->
- <tr class="row1">
- <td width="20">{subscribed_topics.TOPIC_FOLDER_IMG}</td>
- <td>{subscribed_topics.NEWEST_POST_IMG}<a class="topictitle" href="{subscribed_topics.U_TOPIC}">{subscribed_topics.TOPIC_TITLE}</a></td>
- <td width="18">{subscribed_topics.UNSUBSCRIBE_IMG}</td>
- </tr>
- <!-- END subcribed_topics -->
- </table>
- <br clear="all" />
- <table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF">
- <tr>
- <td class="cat" colspan="3" height="28"><span class="cattitle">{L_SUBSCRIBED_FORUMS}</span></td>
- </tr>
- <!-- BEGIN subscribed_forums -->
- <tr class="row1">
- <td width="20">{subscribed_forums.FORUM_FOLDER_IMG}</td>
- <td>{subscribed_forums.NEWEST_FORUM_POST_IMG}<a class="topictitle" href="{subscribed_forums.U_FORUM}">{subscribed_forums.FORUM_NAME}</a></td>
- <td width="18">{subscribed_forums.UNSUBSCRIBE_IMG}</td>
- </tr>
- <!-- END subscribed_forums -->
- </table>
- </td>
- <td align="left" valign="top">
- <table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF">
- <tr>
- <td class="cat" height="28" align="center"><span class="cattitle">{L_WELCOME_USERCP}</span></td>
- </tr>
- <tr>
- <td class="row1"><span class="gen">{UCP_WELCOME_MSG}</span></td>
- </tr>
- </table>
- </td>
- <td width="25%" align="center" valign="top">
- <table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF">
- <tr>
- <td class="cat" colspan="4" height="28"><a href="{U_BUDDY_LIST}" class="cattitle">{L_BUDDY_LIST}</a></td>
- </tr>
- <!-- BEGIN buddy_list -->
- <tr class="row1">
- <td width="20">{buddy_list.ONLINE_IMG}</td>
- <td ><a class="topictitle" href="{buddy_list.U_PROFILE">{buddy_list.BUDDY}</a></td>
- <td width="20"><a href="{buddy_list.U_PM}" class="topictitle">{L_PM}</a></td>
- <td width="18">{buddy_list.REMOVE_BUDDY}</td>
- </tr>
- <!-- END buddy_list -->
- </table>
- <br clear="all" />
- <table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF">
- <tr>
- <td class="cat" colspan="4" height="28"><span class="cattitle">{L_UNREAD_PM}</span</td>
- </tr>
- <!-- BEGIN pm -->
- <tr class="row1">
- <td width="20">{pm.NEW_PM_IMG}</td>
- <td width="70%"><a class="topictitle" href="{pm.U_PM}">{pm.PM_TITLE}</a></td>
- <td width="30%"><a class="topictitle" href="{pm.U_PROFILE}">{pm.PM_SENDER}</a></td>
- <td width="18">{pm.DELETE_PM_IMG}</td>
- </tr>
- <!-- END pm -->
- </table>
- </td>
+ <td width="20%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="4" border="0">
+ <tr>
+ <th>{L_UCP_OPTIONS}</th>
+ </tr>
+ <!-- BEGIN ucp_subsection -->
+ <tr>
+ <!-- IF ucp_subsection.S_SELECTED -->
+ <td class="row1" height="25" nowrap="nowrap"><span class="nav"><b>{ucp_subsection.L_TITLE}</b>
+ <!-- ELSE -->
+ <td class="row2" height="25" nowrap="nowrap" onmouseover="this.className='row1'" onmouseout="this.className='row2'"><a class="nav" href="{ucp_subsection.U_TITLE}">{ucp_subsection.L_TITLE}</a>
+ <!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- END ucp_subsection -->
+ <tr>
+ <td class="row2" height="100%">&nbsp;</td>
+ </tr>
+ <tr>
+ <td class="cat" height="28">&nbsp;</td>
+ </tr>
+ </table></td>
+ <td class="row3"><img src="images/spacer.gif" width="1" alt="" /></td>
+ <td width="100%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
+ <tr>
+ <!-- IF S_DISPLAY_WATCHED -->
+ <th colspan="4">{L_UCP}</th>
+ <!-- ELSE -->
+ <th colspan="3">{L_UCP}</th>
+ <!-- ENDIF -->
+ </tr>
+ <tr class="row1">
+ <!-- IF S_DISPLAY_WATCHED -->
+ <td colspan="4" align="center"><table width="90%" cellspacing="0" cellpadding="4" border="0">
+ <!-- ELSE -->
+ <td colspan="3" align="center"><table width="90%" cellspacing="0" cellpadding="4" border="0">
+ <!-- ENDIF -->
+ <tr>
+ <td class="genmed">{L_UCP_WELCOME}</td>
+ </tr>
+ </table></td>
+ </tr>
+
+ <!-- IF S_DISPLAY_FRONT -->
+ <tr>
+ <th colspan="3">{L_IMPORTANT_NEWS}</th>
+ </tr>
+ <!-- BEGIN topicrow -->
+ <!-- IF topicrow.S_ROW_COUNT is even -->
+ <tr class="row1">
+ <!-- ELSE -->
+ <tr class="row2">
+ <!-- ENDIF -->
+ <td width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <td width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.ATTACH_ICON_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />{topicrow.GOTO_PAGE}</span></td>
+ <td class="postdetails" align="center" valign="middle" nowrap="nowrap">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</td>
+ </tr>
+ <!-- END topicrow -->
+ <tr>
+ <th colspan="3">{L_YOUR_DETAILS}</th>
+ </tr>
+ <tr class="row1">
+ <td class="genmed" colspan="3"><table width="100%" cellspacing="1" cellpadding="2" border="0">
+ <tr>
+ <td class="gen" align="right" valign="middle" nowrap="nowrap">{L_JOINED}: </td>
+ <td width="100%"><b class="gen">{JOINED}</b></td>
+ </tr>
+ <tr>
+ <td class="gen" valign="top" align="right" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td valign="top"><!-- IF POSTS_PCT neq 0 --><b class="gen">{POSTS}</b><br /><span class="genmed">[{POSTS_PCT} / {POSTS_DAY}]<br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></span><!-- ELSE --><b class="gen">{POSTS}<b><!-- ENDIF --></td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td class="cat" colspan="3" height="28">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF S_DISPLAY_WATCHED -->
+ <tr>
+ <th colspan="4">{L_WATCHED_FORUMS}</th>
+ </tr>
+ <!-- BEGIN forumrow -->
+ <!-- IF forumrow.S_ROW_COUNT is even -->
+ <tr class="row1">
+ <!-- ELSE -->
+ <tr class="row2">
+ <!-- ENDIF -->
+ <td width="20" align="center" valign="middle">{forumrow.FOLDER_IMG}</td>
+ <td width="100%" class="forumtitle"><a href="{forumrow.U_VIEW_TOPIC}">{forumrow.FORUM_TITLE}</a></span></td>
+ <td class="postdetails" align="center" valign="middle" nowrap="nowrap">{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR} {forumrow.LAST_POST_IMG}</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" height="25" align="center"><b class="genmed">{L_NO_WATCHED_FORUMS}</b></td>
+ </tr>
+ <!-- END forumrow -->
+ <tr>
+ <th colspan="4">{L_WATCHED_TOPICS}</th>
+ </tr>
+ <!-- BEGIN topicrow -->
+ <!-- IF topicrow.S_ROW_COUNT is even -->
+ <tr class="row1">
+ <!-- ELSE -->
+ <tr class="row2">
+ <!-- ENDIF -->
+ <td width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <td width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.ATTACH_ICON_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />{topicrow.GOTO_PAGE}</span></td>
+ <td class="postdetails" align="center" valign="middle" nowrap="nowrap">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</td>
+ <td> <input type="checkbox" name="t[{topicrow.TOPIC_ID}]" /> </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" height="25" align="center"><b class="genmed">{L_NO_WATCHED_TOPICS}</b></td>
+ </tr>
+ <!-- END topicrow -->
+ <tr>
+ <td class="cat" colspan="4" height="28">&nbsp;</td>
+ </tr>
+ <!-- ENDIF -->
+
+ </table></td>
</tr>
<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/templates/subSilver/ucp_prefs.html b/phpBB/templates/subSilver/ucp_prefs.html
index a3b77b11e2..66e2516528 100644
--- a/phpBB/templates/subSilver/ucp_prefs.html
+++ b/phpBB/templates/subSilver/ucp_prefs.html
@@ -5,7 +5,7 @@
<tr>
<td width="20%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
- <th>Options</th>
+ <th>{L_UCP_OPTIONS}</th>
</tr>
<!-- BEGIN ucp_subsection -->
<tr>
@@ -24,7 +24,8 @@
<td class="cat" height="28">&nbsp;</td>
</tr>
</table></td>
- <td class="row3"><img src="images/spacer.gif" width="1" alt="" /></td> <td width="80%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
+ <td class="row3"><img src="images/spacer.gif" width="1" alt="" /></td>
+ <td width="80%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th colspan="2" height="25" valign="middle">{L_TITLE}</th>
</tr>
@@ -37,7 +38,7 @@
<!-- IF S_DISPLAY_PERSONAL -->
<tr>
- <td class="row1"><b class="genmed">{L_PUBLIC_VIEW_EMAIL}:</b></td>
+ <td class="row1"><b class="genmed">{L_SHOW_EMAIL}:</b></td>
<td class="row2">
<input type="radio" name="viewemail" value="1"{VIEW_EMAIL_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -45,7 +46,7 @@
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_HIDE_USER}:</b></td>
+ <td class="row1"><b class="genmed">{L_HIDE_ONLINE}:</b></td>
<td class="row2">
<input type="radio" name="hideonline" value="1"{HIDE_USER_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -53,16 +54,7 @@
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_NOTIFY_ON_REPLY}:</b><br />
- <span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td>
- <td class="row2">
- <input type="radio" name="notifyreply" value="1"{NOTIFY_REPLY_YES} />
- <span class="gen">{L_YES}</span>&nbsp;&nbsp;
- <input type="radio" name="notifyreply" value="0"{NOTIFY_REPLY_NO} />
- <span class="gen">{L_NO}</span></td>
- </tr>
- <tr>
- <td class="row1"><b class="genmed">{L_NOTIFY_ON_PRIVMSG}:</b></td>
+ <td class="row1"><b class="genmed">{L_NOTIFY_ON_PM}:</b></td>
<td class="row2">
<input type="radio" name="notifypm" value="1"{NOTIFY_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -70,7 +62,7 @@
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_POPUP_ON_PRIVMSG}:</b><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_POPUP_ON_PM}:</b></td>
<td class="row2">
<input type="radio" name="popup_pm" value="1"{POPUP_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -86,12 +78,16 @@
<td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_TIMEZONE}:</b></td>
+ <td class="row1"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
<td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_DATE_FORMAT}:</b><br />
- <span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_BOARD_DST}:</b></td>
+ <td class="row2"><input type="radio" name="dst" value="1"{DST_YES} /> <span class="gen">{L_YES}</span>&nbsp;&nbsp;<input type="radio" name="dst" value="0"{DST_NO} /> <span class="gen">{L_NO}</span></td>
+ </tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_BOARD_DATE_FORMAT}:</b><br />
+ <span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
</td>
@@ -101,7 +97,7 @@
<!-- IF S_DISPLAY_POST -->
<tr>
- <td class="row1"><b class="genmed">{L_ALWAYS_ADD_SIGNATURE}:</b></td>
+ <td class="row1"><b class="genmed">{L_DEFAULT_ADD_SIG}:</b></td>
<td class="row2">
<input type="radio" name="attachsig" value="1"{ALWAYS_ADD_SIGNATURE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -109,7 +105,7 @@
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_ALWAYS_ALLOW_BBCODE}:</b></td>
+ <td class="row1"><b class="genmed">{L_DEFAULT_BBCODE}:</b></td>
<td class="row2">
<input type="radio" name="allowbbcode" value="1"{ALWAYS_ALLOW_BBCODE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -117,7 +113,7 @@
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_ALWAYS_ALLOW_HTML}:</b></td>
+ <td class="row1"><b class="genmed">{L_DEFAULT_HTML}:</b></td>
<td class="row2">
<input type="radio" name="allowhtml" value="1"{ALWAYS_ALLOW_HTML_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
@@ -125,13 +121,21 @@
<span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_ALWAYS_ALLOW_SMILIES}:</b></td>
+ <td class="row1"><b class="genmed">{L_DEFAULT_SMILE}:</b></td>
<td class="row2">
<input type="radio" name="allowsmilies" value="1"{ALWAYS_ALLOW_SMILIES_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowsmilies" value="0"{ALWAYS_ALLOW_SMILIES_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
+ <tr>
+ <td class="row1"><b class="genmed">{L_DEFAULT_NOTIFY}:</b></td>
+ <td class="row2">
+ <input type="radio" name="notifyreply" value="1"{NOTIFY_REPLY_YES} />
+ <span class="gen">{L_YES}</span>&nbsp;&nbsp;
+ <input type="radio" name="notifyreply" value="0"{NOTIFY_REPLY_NO} />
+ <span class="gen">{L_NO}</span></td>
+ </tr>
<!-- ENDIF -->
<tr>
diff --git a/phpBB/templates/subSilver/ucp_profile.html b/phpBB/templates/subSilver/ucp_profile.html
index ade2418f38..93bed921e4 100644
--- a/phpBB/templates/subSilver/ucp_profile.html
+++ b/phpBB/templates/subSilver/ucp_profile.html
@@ -42,25 +42,25 @@
</tr>
<tr>
<td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
- <td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td>
+ <td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" class="post" name="email" size="30" maxlength="255" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td>
</tr>
<!-- IF S_CHANGE_PASSWORD -->
<tr>
<td class="row1"><b class="genmed">{L_NEW_PASSWORD}: </b><br /><span class="gensmall">{L_NEW_PASSWORD_EXPLAIN}</span></td>
- <td class="row2"><input type="password" class="post" style="width: 200px" name="new_password" size="25" maxlength="100" value="{PASSWORD}" /></td>
+ <td class="row2"><input type="password" class="post" name="new_password" size="30" maxlength="100" value="{PASSWORD}" /></td>
</tr>
<tr>
<td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}: </b><br /><span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
- <td class="row2"><input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="100" value="{PASSWORD_CONFIRM}" /></td>
+ <td class="row2"><input type="password" class="post" name="password_confirm" size="30" maxlength="100" value="{PASSWORD_CONFIRM}" /></td>
</tr>
<tr>
<td class="row1"><b class="genmed">{L_CURRENT_PASSWORD}: </b><br /><span class="gensmall">{L_CURRENT_PASSWORD_EXPLAIN}</span></td>
- <td class="row2"><input type="password" class="post" style="width: 200px" name="cur_password" size="25" maxlength="100" value="{PASSWORD}" /></td>
+ <td class="row2"><input type="password" class="post" name="cur_password" size="30" maxlength="100" value="{PASSWORD}" /></td>
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
- <!-- IF S_DISPLAY_PROFILE -->
+ <!-- IF S_DISPLAY_PROFILE_INFO -->
<tr>
<td class="row3" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr>
@@ -166,24 +166,24 @@
<td class="row2" valign="top"><table cellspacing="0" cellpadding="1" border="0">
<!-- IF S_HTML_ALLOWED -->
<tr>
- <td><input type="checkbox" name="disable_html" {S_HTML_CHECKED} /></td>
+ <td><input type="checkbox" name="disable_html"{S_HTML_CHECKED} /></td>
<td class="gen">{L_DISABLE_HTML}</td>
</tr>
<!-- ENDIF -->
<!-- IF S_BBCODE_ALLOWED -->
<tr>
- <td><input type="checkbox" name="disable_bbcode" {S_BBCODE_CHECKED} /></td>
+ <td><input type="checkbox" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
<td class="gen">{L_DISABLE_BBCODE}</td>
</tr>
<!-- ENDIF -->
<!-- IF S_SMILIES_ALLOWED -->
<tr>
- <td><input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} /></td>
+ <td><input type="checkbox" name="disable_smilies"{S_SMILIES_CHECKED} /></td>
<td class="gen">{L_DISABLE_SMILIES}</td>
</tr>
<!-- ENDIF -->
<tr>
- <td><input type="checkbox" name="disable_magic_url" {S_MAGIC_URL_CHECKED} /></td>
+ <td><input type="checkbox" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /></td>
<td class="gen">{L_DISABLE_MAGIC_URL}</td>
</tr>
</table></td>
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index d38c551a74..e412d1fbcd 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -23,13 +23,9 @@
//
// * Registration
// * Link to (additional?) registration conditions
-// * Form based click through rather than links
-// * Inform user of registration method i.e. if a valid email is required
// * Admin defineable characters allowed in usernames?
// * Admin forced revalidation of given user/s from ACP
// * Simple registration (option or always?), i.e. username, email address, password
-// * Tab based control panel
-// * Modular/plug-in approach
// * Opening tab:
// * Last visit time
// * Last active in
@@ -37,20 +33,11 @@
// * Current Karma
// * New PM counter
// * Unread PM counter
-// * Subscribed forum and topic lists + unsubscribe option, etc.
-// * (Unread?) Global announcements?
// * Link/s to MCP if applicable?
// * Black and White lists
// * Add buddy/ignored user
// * Group buddies/ignored users?
// * Mark posts/PM's of buddies different colour?
-// * Preferences
-// * Username
-// * email address/es
-// * password
-// * Various flags
-// * Profile
-// * As required
// * PM system
// * See privmsg
// * Avatars
diff --git a/phpBB/ucp/ucp_main.php b/phpBB/ucp/ucp_main.php
index 1dd4b2795a..b4d86758be 100644
--- a/phpBB/ucp/ucp_main.php
+++ b/phpBB/ucp/ucp_main.php
@@ -23,164 +23,326 @@ class ucp_main extends ucp
{
function main($id)
{
- global $config, $db, $user, $SID, $template, $phpEx;
+ global $config, $censors, $db, $user, $auth, $SID, $template, $phpEx;
- $submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'personal';
+ $submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'front';
// Setup internal subsection display
- $submodules['PERSONAL'] = "i=$id&amp;mode=personal";
- $submodules['VIEW'] = "i=$id&amp;mode=view";
- $submodules['POST'] = "i=$id&amp;mode=post";
-
+ $submodules['FRONT'] = "i=$id&amp;mode=front";
+ $submodules['WATCHED'] = "i=$id&amp;mode=watched";
$this->subsection($submodules, $submode);
unset($submodules);
- switch($submode)
+ switch ($submode)
{
- case 'view':
- break;
+ case 'front':
+
+ if ($config['load_db_lastread'])
+ {
+ $sql = 'SELECT mark_time
+ FROM ' . FORUMS_TRACK_TABLE . '
+ WHERE forum_id = 0
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ $track_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_t'])) ? unserialize($_COOKIE[$config['cookie_name'] . '_t']) : array();
+ $tracking_forums = (isset($_COOKIE[$config['cookie_name'] . '_f'])) ? unserialize($_COOKIE[$config['cookie_name'] . '_f']) : array();
+ }
+
+ $i = 0;
+ $topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT'];
+ $folder = 'folder_announce';
+ $folder_new = $folder . '_new';
+
+ $sql_tracking = (($config['load_db_lastread'] || $config['load_db_track']) && $user->data['user_id'] != ANONYMOUS) ? 'LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')' : '';
+ $sql_select = (($config['load_db_lastread'] || $config['load_db_track']) && $user->data['user_id'] != ANONYMOUS) ? ', tt.mark_type, tt.mark_time' : '';
+ $sql = "SELECT t.* $sql_select
+ FROM (" . TOPICS_TABLE . " t
+ $sql_tracking)
+ WHERE t.forum_id = 0
+ AND t.topic_type = " . POST_ANNOUNCE . '
+ ORDER BY t.topic_last_post_time DESC';
+ $result = $db->sql_query_limit($sql, $config['topics_per_page']);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = $row['forum_id'];
+ $topic_id = $row['topic_id'];
+
+ if ($row['topic_status'] == ITEM_LOCKED)
+ {
+ $topic_type = $user->lang['VIEW_TOPIC_LOCKED'];
+ $folder = 'folder_locked';
+ $folder_new = 'folder_locked_new';
+ }
- case 'post':
- break;
+ $unread_topic = ($user->data['user_id'] != ANONYMOUS) ? true : false;
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ $topic_check = (!$config['load_db_lastread']) ? $tracking_topics[$topic_id] : $row['mark_time'];
+ $forum_check = (!$config['load_db_lastread']) ? $tracking_forums[$forum_id] : $track_data['mark_time'];
- default:
- break;
- }
+ if ($topic_check > $row['topic_last_post_time'] || $forum_check > $row['topic_last_post_time'])
+ {
+ $unread_topic = false;
+ }
+ }
+ $newest_post_img = ($unread_topic) ? "<a href=\"viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;view=unread\">" . $user->img('icon_post_newest', 'VIEW_NEWEST_POST') . '</a> ' : '';
+ $folder_img = ($unread_topic) ? $folder_new : $folder;
+ $folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
- // Subscribed Topics
- $sql = "SELECT tw.topic_id, t.topic_title, t.topic_last_post_time, t.poll_start, t.topic_replies, t.topic_type, t.forum_id
- FROM " . TOPICS_TABLE . " t, " . TOPICS_WATCH_TABLE . " tw
- WHERE t.topic_id = tw.topic_id
- AND tw.user_id = " . $user->data['user_id'] . "
- ORDER BY t.topic_last_post_time DESC";
- $result = $db->sql_query($sql);
+ // Posted image?
+ if (!empty($row['mark_type']))
+ {
+ $folder_img .= '_posted';
+ }
- $topic_count = 0;
- while ($row = $db->sql_fetchrow($result))
- {
- $replies = $row['topic_replies'];
- $topic_id = $row['topic_id'];
- $forum_id = $row['forum_id'];
-
- switch ($row['topic_type'])
- {
- case POST_ANNOUNCE:
- $topic_type = $user->lang['Topic_Announcement'] . ' ';
- $folder = 'folder_announce';
- $folder_new = 'folder_announce_new';
- break;
-
- case POST_STICKY:
- $topic_type = $user->lang['Topic_Sticky'] . ' ';
- $folder = 'folder_sticky';
- $folder_new = 'folder_sticky_new';
- break;
-
- case ITEM_LOCKED:
- $folder = 'folder_locked';
- $folder_new = 'folder_locked_new';
- break;
-
- default:
- if ($replies >= intval($config['hot_threshold']))
+ // Goto message generation
+ $replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+ if (($replies + 1) > intval($config['posts_per_page']))
{
- $folder = 'folder_hot';
- $folder_new = 'folder_hot_new';
+ $total_pages = ceil(($replies + 1) / intval($config['posts_per_page']));
+ $goto_page = ' [ ' . $user->img('icon_post', 'GOTO_PAGE') . $user->lang['GOTO_PAGE'] . ': ';
+
+ $times = 1;
+ for($j = 0; $j < $replies + 1; $j += intval($config['posts_per_page']))
+ {
+ $goto_page .= "<a href=\"viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;start=$j\">$times</a>";
+ if ($times == 1 && $total_pages > 4)
+ {
+ $goto_page .= ' ... ';
+ $times = $total_pages - 3;
+ $j += ($total_pages - 4) * intval($config['posts_per_page']);
+ }
+ else if ($times < $total_pages)
+ {
+ $goto_page .= ', ';
+ }
+ $times++;
+ }
+ $goto_page .= ' ] ';
}
else
{
- $folder = 'folder';
- $folder_new = 'folder_new';
+ $goto_page = '';
}
- break;
- }
- $unread_topic = false;
- if ($user->data['user_id'] && $row['topic_last_post_time'] > $user->data['session_last_visit'])
- {
- $unread_topic = true;
- }
+ $view_topic_url = "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id";
- $newest_post_img = ($unread_topic) ? '<a href="viewtopic.' . $phpEx . $SID . '&amp;t=' . $topic_id . '&amp;view=newest#newest">' . $user->img('goto_post_newest', 'View_newest_post') . '</a> ' : '';
- $folder_img = ($unread_topic) ? $folder_new : $folder;
- $folder_alt = ($unread_topic) ? 'New_posts' : (($row['topic_status'] == ITEM_LOCKED) ? 'Topic_locked' : 'No_new_posts');
+ $last_post_img = "<a href=\"viewtopic.$phpEx$SID&amp;f=$forum_id&amp;p=" . $row['topic_last_post_id'] . '#' . $row['topic_last_post_id'] . '">' . $user->img('icon_post_latest', 'VIEW_LATEST_POST') . '</a>';
- $view_topic_url = 'viewtopic.' . $phpEx . $SID . '&amp;f=' . $forum_id . '&amp;t=' . $topic_id;
+ $last_post_author = ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : "<a href=\"memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $row['topic_last_poster_id'] . '">' . $row['topic_last_poster_name'] . '</a>';
- $template->assign_block_vars('subscribed_topics', array(
- 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'NEWEST_POST_IMG' => $newest_post_img,
+ $template->assign_block_vars('topicrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_POST_AUTHOR' => $last_post_author,
+ 'GOTO_PAGE' => $goto_page,
+ 'TOPIC_TITLE' => (!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['topic_title']) : $row['topic_title'],
+ 'TOPIC_TYPE' => $topic_type,
- 'TOPIC_TITLE' => (!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['topic_title']) : $row['topic_title'],
-
- 'U_TOPIC' => $view_topic_url)
- );
- }
- $db->sql_freeresult($result);
- // End Subscribed Topics
+ 'LAST_POST_IMG' => $last_post_img,
+ 'NEWEST_POST_IMG' => $newest_post_img,
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', '') : '',
+ 'S_ROW_COUNT' => $i,
+ 'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
- // Subscribed Forums
- $sql = "SELECT f.forum_id, f.forum_last_post_time, f.forum_last_post_id, f.left_id, f.right_id, f.forum_status, f.forum_name, f.forum_desc
- FROM " . FORUMS_TABLE . " f, " . FORUMS_WATCH_TABLE . " fw
- WHERE f.forum_id = fw.forum_id
- AND fw.user_id = " . $user->data['user_id'] . "
- ORDER BY f.forum_last_post_time DESC";
- $result = $db->sql_query($sql);
+ 'U_VIEW_TOPIC' => $view_topic_url)
+ );
+
+ $i++;
+ }
+ $db->sql_freeresult($result);
- while ($row = $db->sql_fetchrow($result))
- {
- $forum_id = $row['forum_id'];
-
- $unread_topics = ($user->data['user_id'] && $row['forum_last_post_time'] > $user->data['user_lastvisit']) ? TRUE : FALSE;
-
- $folder_image = ($unread_topics) ? 'forum_new' : 'forum';
- $folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
-
- if ($row['left_id'] + 1 < $row['right_id'])
- {
- $folder_image = ($unread_topics) ? 'sub_forum_new' : 'sub_forum';
- $folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
- }
- elseif ($row['forum_status'] == ITEM_LOCKED)
- {
- $folder_image = 'forum_locked';
- $folder_alt = 'Forum_locked';
- }
- else
- {
- $folder_image = ($unread_topics) ? 'forum_new' : 'forum';
- $folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
- }
-
- $last_post = '<a href="viewtopic.' . $phpEx . $SID . '&amp;f=' . $row['forum_id'] . '&amp;p=' . $row['forum_last_post_id'] . '#' . $row['forum_last_post_id'] . '">' . $user->img('goto_post_latest', 'View_latest_post') . '</a>';
-
-
- $template->assign_block_vars('subscribed_forums', array(
- 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
- 'NEWEST_FORUM_POST_IMG' => $last_post,
-
- 'FORUM_NAME' => $row['forum_name'],
-
- 'U_FORUM' => 'viewforum.' . $phpEx . $SID . '&amp;f=' . $row['forum_id'])
- );
- }
- $db->sql_freeresult($result);
- // End Subscribed forums
- // Buddy List
+ break;
- // End Buddy List
+ case 'watched':
+
+ // Subscribed Topics
+ if ($config['load_db_lastread'])
+ {
+ $sql = 'SELECT mark_time
+ FROM ' . FORUMS_TRACK_TABLE . '
+ WHERE forum_id = 0
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ $track_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_t'])) ? unserialize($_COOKIE[$config['cookie_name'] . '_t']) : array();
+ $tracking_forums = (isset($_COOKIE[$config['cookie_name'] . '_f'])) ? unserialize($_COOKIE[$config['cookie_name'] . '_f']) : array();
+ }
+
+
+ $sql_tracking = (($config['load_db_lastread'] || $config['load_db_track']) && $user->data['user_id'] != ANONYMOUS) ? 'LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')' : '';
+ $sql_select = (($config['load_db_lastread'] || $config['load_db_track']) && $user->data['user_id'] != ANONYMOUS) ? ', tt.mark_type, tt.mark_time' : '';
+ $sql = "SELECT t.* $sql_select
+ FROM (" . TOPICS_TABLE . " t
+ $sql_tracking), " . TOPICS_WATCH_TABLE . ' tw
+ WHERE tw.user_id = ' . $user->data['user_id'] . '
+ AND t.topic_id = tw.topic_id
+ ORDER BY t.topic_last_post_time DESC';
+ $result = $db->sql_query_limit($sql, $config['topics_per_page']);
+
+ $i = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = $row['forum_id'];
+ $topic_id = $row['topic_id'];
+
+ // Goto message generation
+ $replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+
+ $topic_type = '';
+ switch ($row['topic_type'])
+ {
+ case POST_ANNOUNCE:
+ $topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT'];
+ $folder = 'folder_announce';
+ $folder_new = 'folder_announce_new';
+ break;
+
+ case POST_STICKY:
+ $topic_type = $user->lang['VIEW_TOPIC_STICKY'];
+ $folder = 'folder_sticky';
+ $folder_new = 'folder_sticky_new';
+ break;
+
+ default:
+ if ($replies >= intval($config['hot_threshold']))
+ {
+ $folder = 'folder_hot';
+ $folder_new = 'folder_hot_new';
+ }
+ else
+ {
+ $folder = 'folder';
+ $folder_new = 'folder_new';
+ }
+ break;
+ }
+ if ($row['topic_status'] == ITEM_LOCKED)
+ {
+ $topic_type = $user->lang['VIEW_TOPIC_LOCKED'];
+ $folder = 'folder_locked';
+ $folder_new = 'folder_locked_new';
+ }
- // Private Messages
+ $unread_topic = ($user->data['user_id'] != ANONYMOUS) ? true : false;
+ if ($user->data['user_id'] != ANONYMOUS)
+ {
+ $topic_check = (!$config['load_db_lastread']) ? $tracking_topics[$topic_id] : $row['mark_time'];
+ $forum_check = (!$config['load_db_lastread']) ? $tracking_forums[$forum_id] : $track_data['mark_time'];
- // End Private Messages
+ if ($topic_check > $row['topic_last_post_time'] || $forum_check > $row['topic_last_post_time'])
+ {
+ $unread_topic = false;
+ }
+ }
+ $newest_post_img = ($unread_topic) ? "<a href=\"viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;view=unread\">" . $user->img('icon_post_newest', 'VIEW_NEWEST_POST') . '</a> ' : '';
+ $folder_img = ($unread_topic) ? $folder_new : $folder;
+ $folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
+ // Posted image?
+ if (!empty($row['mark_type']))
+ {
+ $folder_img .= '_posted';
+ }
+
+ if (($replies + 1) > intval($config['posts_per_page']))
+ {
+ $total_pages = ceil(($replies + 1) / intval($config['posts_per_page']));
+ $goto_page = ' [ ' . $user->img('icon_post', 'GOTO_PAGE') . $user->lang['GOTO_PAGE'] . ': ';
+
+ $times = 1;
+ for($j = 0; $j < $replies + 1; $j += intval($config['posts_per_page']))
+ {
+ $goto_page .= "<a href=\"viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;start=$j\">$times</a>";
+ if ($times == 1 && $total_pages > 4)
+ {
+ $goto_page .= ' ... ';
+ $times = $total_pages - 3;
+ $j += ($total_pages - 4) * intval($config['posts_per_page']);
+ }
+ else if ($times < $total_pages)
+ {
+ $goto_page .= ', ';
+ }
+ $times++;
+ }
+ $goto_page .= ' ] ';
+ }
+ else
+ {
+ $goto_page = '';
+ }
+
+ $view_topic_url = "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id";
+
+ $last_post_img = "<a href=\"viewtopic.$phpEx$SID&amp;f=$forum_id&amp;p=" . $row['topic_last_post_id'] . '#' . $row['topic_last_post_id'] . '">' . $user->img('icon_post_latest', 'VIEW_LATEST_POST') . '</a>';
+
+ $last_post_author = ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : "<a href=\"memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $row['topic_last_poster_id'] . '">' . $row['topic_last_poster_name'] . '</a>';
+
+ $template->assign_block_vars('topicrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_POST_AUTHOR' => $last_post_author,
+ 'GOTO_PAGE' => $goto_page,
+ 'TOPIC_TITLE' => (!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['topic_title']) : $row['topic_title'],
+ 'TOPIC_TYPE' => $topic_type,
+
+ 'LAST_POST_IMG' => $last_post_img,
+ 'NEWEST_POST_IMG' => $newest_post_img,
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', '') : '',
+
+ 'S_ROW_COUNT' => $i,
+ 'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,
+
+ 'U_VIEW_TOPIC' => $view_topic_url)
+ );
+
+ $i++;
+ }
+ $db->sql_freeresult($result);
+
+
+ // Subscribed Forums
+ $sql = "SELECT f.forum_id, f.forum_last_post_time, f.forum_last_post_id, f.left_id, f.right_id, f.forum_status, f.forum_name, f.forum_desc
+ FROM " . FORUMS_TABLE . " f, " . FORUMS_WATCH_TABLE . " fw
+ WHERE f.forum_id = fw.forum_id
+ AND fw.user_id = " . $user->data['user_id'] . "
+ ORDER BY f.forum_last_post_time DESC";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+
+ }
+ $db->sql_freeresult($result);
+
+ break;
+ }
$template->assign_vars(array(
diff --git a/phpBB/ucp/ucp_profile.php b/phpBB/ucp/ucp_profile.php
index a37fc6a8a3..b1513e0e7f 100644
--- a/phpBB/ucp/ucp_profile.php
+++ b/phpBB/ucp/ucp_profile.php
@@ -29,7 +29,7 @@ class ucp_profile extends ucp
$submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'reg_details';
$submodules['REG_DETAILS'] = "i=$id&amp;mode=reg_details";
- $submodules['PROFILE'] = "i=$id&amp;mode=profile";
+ $submodules['PROFILE_INFO'] = "i=$id&amp;mode=profile_info";
$submodules['SIGNATURE'] = "i=$id&amp;mode=signature";
$submodules['AVATAR'] = "i=$id&amp;mode=avatar";
@@ -50,7 +50,7 @@ class ucp_profile extends ucp
);
break;
- case 'profile':
+ case 'profile_info':
list($day, $month, $year) = explode('-', $user->data['user_birthday']);
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index ff5eb34021..cf60bb8d4b 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -342,7 +342,11 @@ if ($forum_data['forum_type'] == FORUM_POST)
foreach ($row_ary as $row)
{
$topic_id = $row['topic_id'];
- $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+
+
+ // How many replies? hhmmm 1? 2? let's find out
+ $replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
+
// Type and folder
$topic_type = '';
@@ -426,8 +430,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
// Goto message generation
- $replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
-
if (($replies + 1) > intval($config['posts_per_page']))
{
$total_pages = ceil(($replies + 1) / intval($config['posts_per_page']));
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 1b28758072..a480ca961f 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -36,27 +36,20 @@ $topic_id = (isset($_GET['t'])) ? max(intval($_GET['t']), 0) : 0;
$post_id = (isset($_GET['p'])) ? max(intval($_GET['p']), 0) : 0;
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
-// Do we need to check for specific allowed keys here? So long as
-// parameters are not directly used in SQL I'm tempted to say
-// if someone wishes to screw their view up by entering unknown data
-// good luck to them :D
-
-// If, for some reason, the SQL query would not fail and $sort vars were
-// displayed in $pagination_url they could be used for XSS -- Ashe
$sort_days = (!empty($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : 0;
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't';
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'a';
// Do we have a topic or post id?
-if (empty($topic_id) && empty($post_id))
+if (!$topic_id && !$post_id)
{
trigger_error('NO_TOPIC');
}
// Find topic id if user requested a newer or older topic
-if (isset($_GET['view']) && empty($post_id))
+if (isset($_GET['view']) && !$post_id)
{
if ($_GET['view'] == 'unread')
{
@@ -433,7 +426,6 @@ $template->assign_vars(array(
'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_BEEN_REPORTED']),
'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_NOT_BEEN_APPROVED']),
- 'S_TOPIC_LINK' => 't',
'S_SELECT_SORT_DIR' => $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,