Yet more mildly fudged code ... just to get something up, minor fixes/updates elsewhere

git-svn-id: file:///svn/phpbb/trunk@4004 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-05-11 00:58:14 +00:00
parent 549537b9d5
commit 30fd2486d8
10 changed files with 524 additions and 313 deletions

View file

@ -1287,7 +1287,7 @@ function page_header($page_title = '')
'U_INDEX' => 'index.'.$phpEx.$SID, 'U_INDEX' => 'index.'.$phpEx.$SID,
'U_SEARCH' => 'search.'.$phpEx.$SID, 'U_SEARCH' => 'search.'.$phpEx.$SID,
'U_REGISTER' => 'ucp.'.$phpEx.$SID.'&mode=register', '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_MODCP' => 'mcp.'.$phpEx.$SID,
'U_FAQ' => 'faq.'.$phpEx.$SID, 'U_FAQ' => 'faq.'.$phpEx.$SID,
'U_SEARCH_SELF' => 'search.'.$phpEx.$SID.'&search_id=egosearch', 'U_SEARCH_SELF' => 'search.'.$phpEx.$SID.'&search_id=egosearch',

View file

@ -628,39 +628,36 @@ $lang = array(
'UCP' => 'User Control Panel', '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_MAIN' => 'Overview',
'UCP_PREFERENCES' => 'Preferences', 'UCP_FRONT' => 'Front page',
'UCP_PERSONAL' => 'Personal Settings', '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.',
'UCP_VIEW' => 'Viewing Posts', 'IMPORTANT_NEWS'=> 'Important announcements',
'UCP_POST' => 'Posting Messages', '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_WATCHED' => 'Watched items',
'UCP_MESSAGING' => 'Private Messaging', '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_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.', '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', 'WEBSITE' => 'Website',
'LOCATION' => 'Location', '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_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.', 'SIGNATURE_TOO_LONG'=> 'Your signature is too long.',
'UCP_AVATAR' => 'Your avatar',
'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',
'AVATAR' => '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.', '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', 'DELETE_AVATAR' => 'Delete Image',
@ -719,16 +692,55 @@ $lang = array(
'AVATAR_URL' => 'URL of Avatar Image', 'AVATAR_URL' => 'URL of Avatar Image',
'AVATAR_GALLERY' => 'Select from gallery', 'AVATAR_GALLERY' => 'Select from gallery',
'SHOW_GALLERY' => 'Show 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', 'Select_avatar' => 'Select avatar',
'Return_profile' => 'Cancel avatar', 'Return_profile' => 'Cancel avatar',
'Select_category' => 'Select category', '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' => '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', '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',

View file

@ -1,75 +1,127 @@
<!-- INCLUDE ucp_header.html --> <!-- INCLUDE ucp_header.html -->
<tr> <tr>
<th colspan="3">{L_UCP}</th> <td width="20%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="4" border="0">
</tr> <tr>
<tr> <th>{L_UCP_OPTIONS}</th>
<td width="30%" align="left" valign="top"> </tr>
<table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF"> <!-- BEGIN ucp_subsection -->
<tr> <tr>
<td class="cat" colspan="3" height="28"><span class="cattitle">{L_SUBSCRIBED_TOPICS}</span></td> <!-- IF ucp_subsection.S_SELECTED -->
</tr> <td class="row1" height="25" nowrap="nowrap"><span class="nav"><b>{ucp_subsection.L_TITLE}</b>
<!-- BEGIN subscribed_topics --> <!-- ELSE -->
<tr class="row1"> <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>
<td width="20">{subscribed_topics.TOPIC_FOLDER_IMG}</td> <!-- ENDIF -->
<td>{subscribed_topics.NEWEST_POST_IMG}<a class="topictitle" href="{subscribed_topics.U_TOPIC}">{subscribed_topics.TOPIC_TITLE}</a></td> </td>
<td width="18">{subscribed_topics.UNSUBSCRIBE_IMG}</td> </tr>
</tr> <!-- END ucp_subsection -->
<!-- END subcribed_topics --> <tr>
</table> <td class="row2" height="100%">&nbsp;</td>
<br clear="all" /> </tr>
<table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF"> <tr>
<tr> <td class="cat" height="28">&nbsp;</td>
<td class="cat" colspan="3" height="28"><span class="cattitle">{L_SUBSCRIBED_FORUMS}</span></td> </tr>
</tr> </table></td>
<!-- BEGIN subscribed_forums --> <td class="row3"><img src="images/spacer.gif" width="1" alt="" /></td>
<tr class="row1"> <td width="100%" valign="top"><table width="100%" cellspacing="1" cellpadding="4" border="0">
<td width="20">{subscribed_forums.FORUM_FOLDER_IMG}</td> <tr>
<td>{subscribed_forums.NEWEST_FORUM_POST_IMG}<a class="topictitle" href="{subscribed_forums.U_FORUM}">{subscribed_forums.FORUM_NAME}</a></td> <!-- IF S_DISPLAY_WATCHED -->
<td width="18">{subscribed_forums.UNSUBSCRIBE_IMG}</td> <th colspan="4">{L_UCP}</th>
</tr> <!-- ELSE -->
<!-- END subscribed_forums --> <th colspan="3">{L_UCP}</th>
</table> <!-- ENDIF -->
</td> </tr>
<td align="left" valign="top"> <tr class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF"> <!-- IF S_DISPLAY_WATCHED -->
<tr> <td colspan="4" align="center"><table width="90%" cellspacing="0" cellpadding="4" border="0">
<td class="cat" height="28" align="center"><span class="cattitle">{L_WELCOME_USERCP}</span></td> <!-- ELSE -->
</tr> <td colspan="3" align="center"><table width="90%" cellspacing="0" cellpadding="4" border="0">
<tr> <!-- ENDIF -->
<td class="row1"><span class="gen">{UCP_WELCOME_MSG}</span></td> <tr>
</tr> <td class="genmed">{L_UCP_WELCOME}</td>
</table> </tr>
</td> </table></td>
<td width="25%" align="center" valign="top"> </tr>
<table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF">
<tr> <!-- IF S_DISPLAY_FRONT -->
<td class="cat" colspan="4" height="28"><a href="{U_BUDDY_LIST}" class="cattitle">{L_BUDDY_LIST}</a></td> <tr>
</tr> <th colspan="3">{L_IMPORTANT_NEWS}</th>
<!-- BEGIN buddy_list --> </tr>
<tr class="row1"> <!-- BEGIN topicrow -->
<td width="20">{buddy_list.ONLINE_IMG}</td> <!-- IF topicrow.S_ROW_COUNT is even -->
<td ><a class="topictitle" href="{buddy_list.U_PROFILE">{buddy_list.BUDDY}</a></td> <tr class="row1">
<td width="20"><a href="{buddy_list.U_PM}" class="topictitle">{L_PM}</a></td> <!-- ELSE -->
<td width="18">{buddy_list.REMOVE_BUDDY}</td> <tr class="row2">
</tr> <!-- ENDIF -->
<!-- END buddy_list --> <td width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
</table> <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>
<br clear="all" /> <td class="postdetails" align="center" valign="middle" nowrap="nowrap">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</td>
<table width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#FFFFFF"> </tr>
<tr> <!-- END topicrow -->
<td class="cat" colspan="4" height="28"><span class="cattitle">{L_UNREAD_PM}</span</td> <tr>
</tr> <th colspan="3">{L_YOUR_DETAILS}</th>
<!-- BEGIN pm --> </tr>
<tr class="row1"> <tr class="row1">
<td width="20">{pm.NEW_PM_IMG}</td> <td class="genmed" colspan="3"><table width="100%" cellspacing="1" cellpadding="2" border="0">
<td width="70%"><a class="topictitle" href="{pm.U_PM}">{pm.PM_TITLE}</a></td> <tr>
<td width="30%"><a class="topictitle" href="{pm.U_PROFILE}">{pm.PM_SENDER}</a></td> <td class="gen" align="right" valign="middle" nowrap="nowrap">{L_JOINED}: </td>
<td width="18">{pm.DELETE_PM_IMG}</td> <td width="100%"><b class="gen">{JOINED}</b></td>
</tr> </tr>
<!-- END pm --> <tr>
</table> <td class="gen" valign="top" align="right" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
</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> </tr>
<!-- INCLUDE ucp_footer.html --> <!-- INCLUDE ucp_footer.html -->

View file

@ -5,7 +5,7 @@
<tr> <tr>
<td width="20%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="4" border="0"> <td width="20%" height="100%"><table width="100%" height="100%" cellspacing="1" cellpadding="4" border="0">
<tr> <tr>
<th>Options</th> <th>{L_UCP_OPTIONS}</th>
</tr> </tr>
<!-- BEGIN ucp_subsection --> <!-- BEGIN ucp_subsection -->
<tr> <tr>
@ -24,7 +24,8 @@
<td class="cat" height="28">&nbsp;</td> <td class="cat" height="28">&nbsp;</td>
</tr> </tr>
</table></td> </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> <tr>
<th colspan="2" height="25" valign="middle">{L_TITLE}</th> <th colspan="2" height="25" valign="middle">{L_TITLE}</th>
</tr> </tr>
@ -37,7 +38,7 @@
<!-- IF S_DISPLAY_PERSONAL --> <!-- IF S_DISPLAY_PERSONAL -->
<tr> <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"> <td class="row2">
<input type="radio" name="viewemail" value="1"{VIEW_EMAIL_YES} /> <input type="radio" name="viewemail" value="1"{VIEW_EMAIL_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -45,7 +46,7 @@
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<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"> <td class="row2">
<input type="radio" name="hideonline" value="1"{HIDE_USER_YES} /> <input type="radio" name="hideonline" value="1"{HIDE_USER_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -53,16 +54,7 @@
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<tr> <tr>
<td class="row1"><b class="genmed">{L_NOTIFY_ON_REPLY}:</b><br /> <td class="row1"><b class="genmed">{L_NOTIFY_ON_PM}:</b></td>
<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="row2"> <td class="row2">
<input type="radio" name="notifypm" value="1"{NOTIFY_PM_YES} /> <input type="radio" name="notifypm" value="1"{NOTIFY_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -70,7 +62,7 @@
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<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"> <td class="row2">
<input type="radio" name="popup_pm" value="1"{POPUP_PM_YES} /> <input type="radio" name="popup_pm" value="1"{POPUP_PM_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -86,12 +78,16 @@
<td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td> <td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>
</tr> </tr>
<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> <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
</tr> </tr>
<tr> <tr>
<td class="row1"><b class="genmed">{L_DATE_FORMAT}:</b><br /> <td class="row1"><b class="genmed">{L_BOARD_DST}:</b></td>
<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></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"> <td class="row2">
<input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" /> <input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
</td> </td>
@ -101,7 +97,7 @@
<!-- IF S_DISPLAY_POST --> <!-- IF S_DISPLAY_POST -->
<tr> <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"> <td class="row2">
<input type="radio" name="attachsig" value="1"{ALWAYS_ADD_SIGNATURE_YES} /> <input type="radio" name="attachsig" value="1"{ALWAYS_ADD_SIGNATURE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -109,7 +105,7 @@
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<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"> <td class="row2">
<input type="radio" name="allowbbcode" value="1"{ALWAYS_ALLOW_BBCODE_YES} /> <input type="radio" name="allowbbcode" value="1"{ALWAYS_ALLOW_BBCODE_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -117,7 +113,7 @@
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<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"> <td class="row2">
<input type="radio" name="allowhtml" value="1"{ALWAYS_ALLOW_HTML_YES} /> <input type="radio" name="allowhtml" value="1"{ALWAYS_ALLOW_HTML_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
@ -125,13 +121,21 @@
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </tr>
<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"> <td class="row2">
<input type="radio" name="allowsmilies" value="1"{ALWAYS_ALLOW_SMILIES_YES} /> <input type="radio" name="allowsmilies" value="1"{ALWAYS_ALLOW_SMILIES_YES} />
<span class="gen">{L_YES}</span>&nbsp;&nbsp; <span class="gen">{L_YES}</span>&nbsp;&nbsp;
<input type="radio" name="allowsmilies" value="0"{ALWAYS_ALLOW_SMILIES_NO} /> <input type="radio" name="allowsmilies" value="0"{ALWAYS_ALLOW_SMILIES_NO} />
<span class="gen">{L_NO}</span></td> <span class="gen">{L_NO}</span></td>
</tr> </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 --> <!-- ENDIF -->
<tr> <tr>

View file

@ -42,25 +42,25 @@
</tr> </tr>
<tr> <tr>
<td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td> <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> </tr>
<!-- IF S_CHANGE_PASSWORD --> <!-- IF S_CHANGE_PASSWORD -->
<tr> <tr>
<td class="row1"><b class="genmed">{L_NEW_PASSWORD}: </b><br /><span class="gensmall">{L_NEW_PASSWORD_EXPLAIN}</span></td> <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>
<tr> <tr>
<td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}: </b><br /><span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td> <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>
<tr> <tr>
<td class="row1"><b class="genmed">{L_CURRENT_PASSWORD}: </b><br /><span class="gensmall">{L_CURRENT_PASSWORD_EXPLAIN}</span></td> <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> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_DISPLAY_PROFILE --> <!-- IF S_DISPLAY_PROFILE_INFO -->
<tr> <tr>
<td class="row3" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td> <td class="row3" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr> </tr>
@ -166,24 +166,24 @@
<td class="row2" valign="top"><table cellspacing="0" cellpadding="1" border="0"> <td class="row2" valign="top"><table cellspacing="0" cellpadding="1" border="0">
<!-- IF S_HTML_ALLOWED --> <!-- IF S_HTML_ALLOWED -->
<tr> <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> <td class="gen">{L_DISABLE_HTML}</td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_BBCODE_ALLOWED --> <!-- IF S_BBCODE_ALLOWED -->
<tr> <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> <td class="gen">{L_DISABLE_BBCODE}</td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_SMILIES_ALLOWED --> <!-- IF S_SMILIES_ALLOWED -->
<tr> <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> <td class="gen">{L_DISABLE_SMILIES}</td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<tr> <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> <td class="gen">{L_DISABLE_MAGIC_URL}</td>
</tr> </tr>
</table></td> </table></td>

View file

@ -23,13 +23,9 @@
// //
// * Registration // * Registration
// * Link to (additional?) registration conditions // * 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 defineable characters allowed in usernames?
// * Admin forced revalidation of given user/s from ACP // * Admin forced revalidation of given user/s from ACP
// * Simple registration (option or always?), i.e. username, email address, password // * Simple registration (option or always?), i.e. username, email address, password
// * Tab based control panel
// * Modular/plug-in approach
// * Opening tab: // * Opening tab:
// * Last visit time // * Last visit time
// * Last active in // * Last active in
@ -37,20 +33,11 @@
// * Current Karma // * Current Karma
// * New PM counter // * New PM counter
// * Unread PM counter // * Unread PM counter
// * Subscribed forum and topic lists + unsubscribe option, etc.
// * (Unread?) Global announcements?
// * Link/s to MCP if applicable? // * Link/s to MCP if applicable?
// * Black and White lists // * Black and White lists
// * Add buddy/ignored user // * Add buddy/ignored user
// * Group buddies/ignored users? // * Group buddies/ignored users?
// * Mark posts/PM's of buddies different colour? // * Mark posts/PM's of buddies different colour?
// * Preferences
// * Username
// * email address/es
// * password
// * Various flags
// * Profile
// * As required
// * PM system // * PM system
// * See privmsg // * See privmsg
// * Avatars // * Avatars

View file

@ -23,164 +23,326 @@ class ucp_main extends ucp
{ {
function main($id) 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 // Setup internal subsection display
$submodules['PERSONAL'] = "i=$id&amp;mode=personal"; $submodules['FRONT'] = "i=$id&amp;mode=front";
$submodules['VIEW'] = "i=$id&amp;mode=view"; $submodules['WATCHED'] = "i=$id&amp;mode=watched";
$submodules['POST'] = "i=$id&amp;mode=post";
$this->subsection($submodules, $submode); $this->subsection($submodules, $submode);
unset($submodules); unset($submodules);
switch($submode) switch ($submode)
{ {
case 'view': case 'front':
break;
case 'post': if ($config['load_db_lastread'])
break; {
$sql = 'SELECT mark_time
FROM ' . FORUMS_TRACK_TABLE . '
WHERE forum_id = 0
AND user_id = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
default: $track_data = $db->sql_fetchrow($result);
break; $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';
// Subscribed Topics $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 tw.topic_id, t.topic_title, t.topic_last_post_time, t.poll_start, t.topic_replies, t.topic_type, t.forum_id $sql_select = (($config['load_db_lastread'] || $config['load_db_track']) && $user->data['user_id'] != ANONYMOUS) ? ', tt.mark_type, tt.mark_time' : '';
FROM " . TOPICS_TABLE . " t, " . TOPICS_WATCH_TABLE . " tw $sql = "SELECT t.* $sql_select
WHERE t.topic_id = tw.topic_id FROM (" . TOPICS_TABLE . " t
AND tw.user_id = " . $user->data['user_id'] . " $sql_tracking)
ORDER BY t.topic_last_post_time DESC"; WHERE t.forum_id = 0
$result = $db->sql_query($sql); AND t.topic_type = " . POST_ANNOUNCE . '
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $config['topics_per_page']);
$topic_count = 0; while ($row = $db->sql_fetchrow($result))
while ($row = $db->sql_fetchrow($result)) {
{ $forum_id = $row['forum_id'];
$replies = $row['topic_replies']; $topic_id = $row['topic_id'];
$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: if ($row['topic_status'] == ITEM_LOCKED)
$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']))
{ {
$folder = 'folder_hot'; $topic_type = $user->lang['VIEW_TOPIC_LOCKED'];
$folder_new = 'folder_hot_new'; $folder = 'folder_locked';
$folder_new = 'folder_locked_new';
}
$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'];
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';
}
// 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']));
$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 else
{ {
$folder = 'folder'; $goto_page = '';
$folder_new = 'folder_new';
} }
break;
}
$unread_topic = false; $view_topic_url = "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id";
if ($user->data['user_id'] && $row['topic_last_post_time'] > $user->data['session_last_visit'])
{
$unread_topic = true;
}
$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> ' : ''; $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>';
$folder_img = ($unread_topic) ? $folder_new : $folder;
$folder_alt = ($unread_topic) ? 'New_posts' : (($row['topic_status'] == ITEM_LOCKED) ? 'Topic_locked' : 'No_new_posts');
$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( $template->assign_block_vars('topicrow', array(
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'FORUM_ID' => $forum_id,
'NEWEST_POST_IMG' => $newest_post_img, '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'], 'LAST_POST_IMG' => $last_post_img,
'NEWEST_POST_IMG' => $newest_post_img,
'U_TOPIC' => $view_topic_url) '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);
break;
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';
}
$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'];
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;
} }
$db->sql_freeresult($result);
// End Subscribed Topics
// 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))
{
$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
// End Buddy List
// Private Messages
// End Private Messages
$template->assign_vars(array( $template->assign_vars(array(

View file

@ -29,7 +29,7 @@ class ucp_profile extends ucp
$submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'reg_details'; $submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'reg_details';
$submodules['REG_DETAILS'] = "i=$id&amp;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['SIGNATURE'] = "i=$id&amp;mode=signature";
$submodules['AVATAR'] = "i=$id&amp;mode=avatar"; $submodules['AVATAR'] = "i=$id&amp;mode=avatar";
@ -50,7 +50,7 @@ class ucp_profile extends ucp
); );
break; break;
case 'profile': case 'profile_info':
list($day, $month, $year) = explode('-', $user->data['user_birthday']); list($day, $month, $year) = explode('-', $user->data['user_birthday']);

View file

@ -342,7 +342,11 @@ if ($forum_data['forum_type'] == FORUM_POST)
foreach ($row_ary as $row) foreach ($row_ary as $row)
{ {
$topic_id = $row['topic_id']; $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 // Type and folder
$topic_type = ''; $topic_type = '';
@ -426,8 +430,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
// Goto message generation // Goto message generation
$replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
if (($replies + 1) > intval($config['posts_per_page'])) if (($replies + 1) > intval($config['posts_per_page']))
{ {
$total_pages = ceil(($replies + 1) / intval($config['posts_per_page'])); $total_pages = ceil(($replies + 1) / intval($config['posts_per_page']));

View file

@ -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; $post_id = (isset($_GET['p'])) ? max(intval($_GET['p']), 0) : 0;
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 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_days = (!empty($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : 0;
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't'; $sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't';
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'a'; $sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'a';
// Do we have a topic or post id? // Do we have a topic or post id?
if (empty($topic_id) && empty($post_id)) if (!$topic_id && !$post_id)
{ {
trigger_error('NO_TOPIC'); trigger_error('NO_TOPIC');
} }
// Find topic id if user requested a newer or older 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') if ($_GET['view'] == 'unread')
{ {
@ -433,7 +426,6 @@ $template->assign_vars(array(
'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_BEEN_REPORTED']), 'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_BEEN_REPORTED']),
'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_NOT_BEEN_APPROVED']), '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_DIR' => $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_SELECT_SORT_DAYS' => $s_limit_days,