Pārlūkot izejas kodu

! General template cleanup, css, text, etc ... the mundane stuff that makes you crazy

Signed-off-by: Spuds <[email protected]>
Spuds 12 gadi atpakaļ
vecāks
revīzija
9b3431a24a

+ 1 - 1
Sources/Security.php

@@ -39,7 +39,7 @@ function validateSession($type = 'admin')
 	// If we're using XML give an additional ten minutes grace as an admin can't log on in XML mode.
 	$refreshTime = isset($_GET['xml']) ? 4200 : 3600;
 
-	// Is the security option off? 
+	// Is the security option off?
 	if (!empty($modSettings['securityDisable' . ($type != 'admin' ? '_' . $type : '')]))
 		return;
 		

+ 4 - 2
Sources/Session.php

@@ -210,7 +210,7 @@ function sessionDestroy($session_id)
 }
 
 /**
- * Implementation of sessionDestroy() replacing the standard gc handler.
+ * Implementation of sessionGC() replacing the standard gc handler.
  * Callback for garbage collection.
  *
  * @param int $max_lifetime
@@ -232,4 +232,6 @@ function sessionGC($max_lifetime)
 			'last_update' => time() - $max_lifetime,
 		)
 	);
-}
+}
+
+?>

+ 1 - 1
Sources/Subs.php

@@ -3331,7 +3331,7 @@ function getLegacyAttachmentFilename($filename, $attachment_id, $dir = null, $ne
  * internal function used to convert a user-readable format to a format suitable for the database.
  *
  * @param string $fullip
- * @return array 
+ * @return array|string 'unknown' if the ip in the input was '255.255.255.255'
  */
 function ip2range($fullip)
 {

+ 3 - 3
Themes/default/BoardIndex.template.php

@@ -107,7 +107,7 @@ function template_main()
 		// If this category even can collapse, show a link to collapse it.
 		if ($category['can_collapse'])
 			echo '
-								<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
+								<a class="collapse" href="', $category['collapse_href'], '" title="' ,$category['is_collapsed'] ? $txt['show'] : $txt['hide'] ,'">', $category['collapse_image'], '</a>';
 
 		if (!$context['user']['is_guest'] && !empty($category['show_unread']))
 			echo '
@@ -174,7 +174,7 @@ function template_main()
 				// Show some basic information about the number of posts, etc.
 					echo '
 					</td>
-					<td class="stats windowbg">
+					<td class="windowbg stats">
 						<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
 						', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
 						</p>
@@ -371,7 +371,7 @@ function template_info_center()
 			//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
 			foreach ($context['calendar_events'] as $event)
 				echo '
-					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
+					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/calendar_modify.png" alt="*" class="centericon" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
 		}
 		
 		echo '

+ 1 - 1
Themes/default/Display.template.php

@@ -578,7 +578,7 @@ function template_main()
 						<div class="moderatorbar">
 							<div class="smalltext modified" id="modified_', $message['id'], '">';
 
-		// Show "� Last Edit: Time by Person �" if this post was edited.
+		// Show "<< Last Edit: Time by Person >>" if this post was edited.
 		if ($settings['show_modify'] && !empty($message['modified']['name']))
 			echo '
 								&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';

+ 2 - 4
Themes/default/Errors.template.php

@@ -158,10 +158,8 @@ function template_error_log()
 					</td>
 				</tr>
 			</table>
-			<div class="pagesection">
-				<div class="floatleft">
-					', $txt['pages'], ': ', $context['page_index'], '
-				</div>
+			<div class="pagesection floatleft">
+				&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'], '
 			</div>';  
 
 	echo '

+ 5 - 3
Themes/default/GenericMenu.template.php

@@ -37,7 +37,7 @@ function template_generic_menu_sidebar_above()
 		if ($firstSection && !empty($menu_context['can_toggle_drop_down']))
 		{
 			echo '
-							<a href="', $menu_context['toggle_url'], '">', $section['title'],'<img style="margin: 0 5px; vertical-align: middle;" src="', $context['menu_image_path'], '/change_menu', $context['right_to_left'] ? '' : '2', '.png" alt="!" /></a>';
+							<a href="', $menu_context['toggle_url'], '">', $section['title'],'<img src="', $context['menu_image_path'], '/change_menu', $context['right_to_left'] ? '' : '2', '.png" alt="!" /></a>';
 		}
 		else
 		{
@@ -101,7 +101,8 @@ function template_generic_menu_sidebar_below()
 
 	echo '
 		</div>
-	</div><br class="clear" />';
+	</div>
+	<br class="clear" />';
 }
 
 // This contains the html for the side bar of the admin center, which is used for all admin pages.
@@ -315,7 +316,8 @@ function template_generic_menu_tabs(&$menu_context)
 		// the end of tabs
 		echo '
 		</ul>
-	</div><br class="clear" />';
+	</div>
+	<br class="clear" />';
 	}
 	// ...if not use the old style
 	else

+ 3 - 2
Themes/default/Help.template.php

@@ -162,7 +162,7 @@ function template_manual()
 			<div id="help_container">
 				<div class="windowbg2">
 					<span class="topslice"><span></span></span>
-					<div id="helpmain">
+					<div id="helpmain" class="content">
 						<p>', sprintf($txt['manual_welcome'], $context['forum_name']), '</p>
 						<p>', $txt['manual_introduction'], '</p>
 						<ul>';
@@ -179,7 +179,8 @@ function template_manual()
 					</div>
 					<span class="botslice"><span></span></span>
 				</div>
-			</div>';
+			</div>
+			<br class="clear" />';
 }
 
 ?>

+ 4 - 8
Themes/default/ModerationCenter.template.php

@@ -258,10 +258,8 @@ function template_reported_posts()
 				', $context['view_closed'] ? $txt['mc_reportedp_closed'] : $txt['mc_reportedp_active'], '
 			</h3>
 		</div>
-		<div class="pagesection">
-			<div class="floatleft">
-				', $txt['pages'], ': ', $context['page_index'], '
-			</div>
+		<div class="pagesection floatleft">
+			', $txt['pages'], ': ', $context['page_index'], '
 		</div>';
 
 	// Make the buttons.
@@ -359,10 +357,8 @@ function template_unapproved_posts()
 		</div>';
 	else
 		echo '
-			<div class="pagesection">
-				<div class="floatleft">
-					', $txt['pages'], ': ', $context['page_index'], '
-				</div>
+			<div class="pagesection floatleft">
+				', $txt['pages'], ': ', $context['page_index'], '
 			</div>';
 
 	foreach ($context['unapproved_items'] as $item)

+ 3 - 0
Themes/default/languages/index.english.php

@@ -109,6 +109,9 @@ $txt['replies'] = 'Replies';
 $txt['last_post'] = 'Last post';
 $txt['last_post_message'] = '<strong>Last post</strong> by %1$s<br />in %2$s<br />on %3$s';
 $txt['boardindex_total_posts'] = '%1$d Posts in %2$d Topics by %3$d Members.';
+$txt['show'] = 'Show';
+$txt['hide'] = 'Hide';
+
 $txt['admin_login'] = 'Administration Login';
 // Use numeric entities in the below string.
 $txt['topic'] = 'Topic';