Changeset 1654 in ExiteCMS
- Timestamp:
- 08/19/08 11:02:58 (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 edited
-
administration/settings_forum.php (modified) (1 diff)
-
administration/tools/language_pack_English.php (modified) (2 diffs)
-
administration/tools/language_pack_Nederlands.php (modified) (2 diffs)
-
administration/upgrade/rev01650.php (added)
-
files/locales/en.main.global.php (modified) (1 diff)
-
forum/viewforum.php (modified) (2 diffs)
-
forum/viewposts.php (modified) (2 diffs)
-
forum/viewthread.php (modified) (3 diffs)
-
includes/templates/admin.settings_forum.tpl (modified) (2 diffs)
-
includes/templates/forum.index.tpl (modified) (1 diff)
-
includes/templates/forum.viewforum.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/settings_forum.php
r1423 r1654 39 39 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['unread_threshold']) ? $_POST['unread_threshold'] : "0")."' WHERE cfg_name = 'unread_threshold'"); 40 40 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['forum_edit_timeout']) ? $_POST['forum_edit_timeout'] : "0")."' WHERE cfg_name = 'forum_edit_timeout'"); 41 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['forum_guest_limit']) ? $_POST['forum_guest_limit'] : "0")."' WHERE cfg_name = 'forum_guest_limit'"); 41 42 } 42 43 -
trunk/administration/tools/language_pack_English.php
r1648 r1654 1040 1040 $localestrings['541'] = ", then "; 1041 1041 $localestrings['542'] = ", with OpenID"; 1042 $localestrings['543'] = "Limit forum posts for guests to:"; 1043 $localestrings['544'] = "No Limit"; 1042 1044 $localestrings['550'] = "Security"; 1043 1045 $localestrings['551'] = "Enable registration system?"; … … 2313 2315 $localestrings['460'] = "Sticky Thread."; 2314 2316 $localestrings['461'] = "You are not authorised to view this Forum."; 2317 $localestrings['462'] = "For guest users, only the active threads of the last %s are visible. Please consider becoming a member"; 2315 2318 $localestrings['500'] = "View Thread"; 2316 2319 $localestrings['501'] = "Author"; -
trunk/administration/tools/language_pack_Nederlands.php
r1648 r1654 1040 1040 $localestrings['541'] = ", daarna "; 1041 1041 $localestrings['542'] = ", met OpenID"; 1042 $localestrings['543'] = "Forumberichten voor gasten limiteren tot:"; 1043 $localestrings['544'] = "Geen limiet"; 1042 1044 $localestrings['550'] = "Beveiliging"; 1043 1045 $localestrings['551'] = "Activeer registratie systeem?"; … … 2313 2315 $localestrings['460'] = "Belangrijke topic."; 2314 2316 $localestrings['461'] = "U bent niet geauthoriseerd om dit forum te bekijken."; 2317 $localestrings['462'] = "Voor gasten zijn alleen de topics van de laatste %s zichtbaar. Wordt lid om alles te kunnen zien"; 2315 2318 $localestrings['500'] = "Bekijk topic"; 2316 2319 $localestrings['501'] = "Auteur"; -
trunk/files/locales/en.main.global.php
r1648 r1654 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Sun Aug 17 2008, 18:14:24CEST5 // generated on : Mon Aug 18 2008, 22:18:00 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
trunk/forum/viewforum.php
r1549 r1654 146 146 $variables['rowstart'] = $rowstart; 147 147 148 // is a thread time limit defined for guest users? 149 $thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 150 148 151 // get the threads to fill this page 149 152 $result = dbquery( … … 153 156 LEFT JOIN ".$db_prefix."users tu1 ON t.thread_author = tu1.user_id 154 157 LEFT JOIN ".$db_prefix."users tu2 ON t.thread_lastuser = tu2.user_id 155 WHERE t.forum_id = '".$forum_id."' 158 WHERE t.forum_id = '".$forum_id."'".($thread_limit==0?"":" AND t.thread_lastpost > ".$thread_limit)." 156 159 GROUP BY thread_id 157 160 ORDER BY thread_sticky DESC, thread_lastpost DESC -
trunk/forum/viewposts.php
r1405 r1654 31 31 if (!isset($forum_id) || !isNum($forum_id)) $forum_id = false; 32 32 33 // is a thread time limit defined for guest users? 34 $thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 35 33 36 // check if we have anything to display 34 37 $result = dbquery( 35 38 "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp 39 INNER JOIN ".$db_prefix."threads th USING(thread_id) 36 40 INNER JOIN ".$db_prefix."forums tf USING(forum_id) 37 WHERE ". groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")41 WHERE ".($thread_limit==0?"":" th.thread_lastpost > ".$thread_limit." AND ").groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "") 38 42 ); 43 39 44 $rows = dbrows($result); 40 45 $variables['rows'] = $rows; … … 46 51 $result = dbquery( 47 52 "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp 53 INNER JOIN ".$db_prefix."threads th USING(thread_id) 48 54 INNER JOIN ".$db_prefix."forums tf USING(forum_id) 49 WHERE ". groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")."55 WHERE ".($thread_limit==0?"":" th.thread_lastpost > ".$thread_limit." AND ").groupaccess('forum_access').($forum_id ? " AND tp.forum_id = '$forum_id'" : "")." 50 56 ORDER BY post_datestamp DESC 51 57 LIMIT $rowstart,".ITEMS_PER_PAGE -
trunk/forum/viewthread.php
r1598 r1654 118 118 $variables['user_can_blacklist'] = checkrights("B"); 119 119 120 // check if there is a thread time limit defined for guests 121 $thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 122 120 123 // get information about the current thread 121 124 $result = dbquery( 122 125 "SELECT * FROM ".$db_prefix."threads 123 WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'" 126 WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'".($thread_limit==0?"":" AND thread_lastpost > ".$thread_limit) 124 127 ); 125 // bail out if the requested forumdoes not exist128 // bail out if the requested thread does not exist 126 129 if (!dbrows($result)) { 127 fallback("index.php"); 128 } 130 fallback("viewforum.php?forum_id=".$forum_id); 131 } 132 129 133 // store the thread information 130 134 $tdata = dbarray($result); … … 342 346 } else { 343 347 // check if the post timestamp within the set unread threshold 344 if ($data['post_datestamp'] > $settings['unread_threshold'] || $data['post_editt time'] > $settings['unread_threshold']) {348 if ($data['post_datestamp'] > $settings['unread_threshold'] || $data['post_edittime'] > $settings['unread_threshold']) { 345 349 // check if it is newer that the first and last marker in the threads_read record 346 350 if ($data['post_datestamp'] > $thread_last_read || $data['post_edittime'] > $thread_last_read || $data['post_datestamp'] < $thread_first_read || ($data['post_edittime'] != 0 && $data['post_edittime'] < $thread_first_read)) { … … 349 353 $data['unread'] = false; 350 354 } 355 } else { 356 $data['unread'] = false; 351 357 } 352 358 } -
trunk/includes/templates/admin.settings_forum.tpl
r1639 r1654 82 82 <select name='unread_threshold' class='textbox'> 83 83 {section name=days start=0 loop=361 step=30} 84 <option value='{$smarty.section.days.index}' {if $smarty.section.days.index == $settings2.unread_threshold|default:0}selected='selected'{/if}>{if $smarty.section.days.index == 0}{$locale. 714}{else}{$smarty.section.days.index} {$locale.518}{/if}</option>84 <option value='{$smarty.section.days.index}' {if $smarty.section.days.index == $settings2.unread_threshold|default:0}selected='selected'{/if}>{if $smarty.section.days.index == 0}{$locale.544}{else}{$smarty.section.days.index} {$locale.518}{/if}</option> 85 85 {/section} 86 86 </select> … … 108 108 {section name=hours start=1 loop=25} 109 109 <option value='{$smarty.section.hours.index}' {if $settings2.forum_edit_timeout == $smarty.section.hours.index}selected='selected'{/if}>{$smarty.section.hours.index} {if $smarty.section.hours.index == 1}{$locale.535}{else}{$locale.536}{/if}</option> 110 {/section} 111 </select> 112 </td> 113 </tr> 114 <tr> 115 <td width='60%' class='tbl'> 116 {$locale.543} 117 </td> 118 <td width='40%' class='tbl'> 119 <select name='forum_guest_limit' class='textbox'> 120 <option value='0' {if $settings2.forum_guest_limit}selected='selected'{/if}>{$locale.544}</option> 121 {section name=days start=1 loop=91} 122 <option value='{$smarty.section.days.index}' {if $settings2.forum_guest_limit == $smarty.section.days.index}selected='selected'{/if}>{$smarty.section.days.index} {if $smarty.section.days.index == 1}{$locale.527}{else}{$locale.518}{/if}</option> 110 123 {/section} 111 124 </select> -
trunk/includes/templates/forum.index.tpl
r1486 r1654 48 48 </td> 49 49 </tr> 50 {if !iMEMBER && $settings.forum_guest_limit} 51 <tr> 52 <td class='tbl2' align='center' colspan='6'> 53 <span class='small' style='font-size:90%;font-weight:bold;'>{if $settings.forum_guest_limit == 1}{$locale.462|sprintf:$locale.074}{else}{assign var=days value=$settings.forum_guest_limit|cat:" "|cat:$locale.075}{$locale.462|sprintf:$days}{/if}</span> 54 </td> 55 </tr> 56 {/if} 50 57 {/if} 51 58 <tr> -
trunk/includes/templates/forum.viewforum.tpl
r1616 r1654 165 165 </tr> 166 166 {/section} 167 {if !iMEMBER && $settings.forum_guest_limit} 168 <tr> 169 <td class='tbl2' align='center' colspan='7'> 170 <span class='small' style='font-size:90%;font-weight:bold;'>{if $settings.forum_guest_limit == 1}{$locale.462|sprintf:$locale.074}{else}{assign var=days value=$settings.forum_guest_limit|cat:" "|cat:$locale.075}{$locale.462|sprintf:$days}{/if}</span> 171 </td> 172 </tr> 173 {/if} 167 174 </table> 168 175 </td>
Note: See TracChangeset
for help on using the changeset viewer.
