Explorar el Código

! adjustments to the credits page, separate mods and library packs from copyright section to their own

Signed-off-by: Spuds <[email protected]>
Spuds hace 12 años
padre
commit
805f28ddbf
Se han modificado 3 ficheros con 85 adiciones y 27 borrados
  1. 27 17
      Sources/Who.php
  2. 55 9
      Themes/default/Who.template.php
  3. 3 1
      Themes/default/languages/Who.english.php

+ 27 - 17
Sources/Who.php

@@ -684,22 +684,21 @@ function Credits($in_admin = false)
 			),
 		),
 	);
-
-	$context['copyrights'] = array(
-		'smf' => sprintf($forum_copyright, $forum_version),
-		'other' => array(
+	
+	// Give credit to any graphic library's, software library's, plugins etc
+	$context['credits_software_graphics'] = array(
+		'graphics' => array(
 			'<a href="http://p.yusukekamiyamane.com/">Fugue Icons</a> | &copy; 2012 Yusuke Kamiyamane | These icons are licensed under a Creative Commons Attribution 3.0 License',
 		),
-		/* Modification Authors:  You may add a copyright statement to this array for your mods.
-			Copyright statements should be in the form of a value only without a array key.  I.E.:
-				'Some Mod by Thantos &copy; 2010',
-				$txt['some_mod_copyright'],
-		*/
-		'mods' => array(
+		'software' => array(
+			'<a href="http://jquery.org/">JQuery</a> | &copy; John Resig | Licensed under <a href="http://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt">The MIT License (MIT)</a>',
+			'<a href="http://cherne.net/brian/resources/jquery.hoverIntent.html">hoverIntent</a> | &copy; Brian Cherne | Licensed under <a href="http://en.wikipedia.org/wiki/MIT_License">The MIT License (MIT)</a>',
+			'<a href="http://users.tpg.com.au/j_birch/plugins/superfish/">Superfish</a> | &copy; Joel Birch | Licensed under <a href="http://en.wikipedia.org/wiki/MIT_License">The MIT License (MIT)</a>',
 		),
 	);
-
+	
 	// support for mods that use the <credits> tag via the package manager
+	$context['credits_modifications'] = array();
 	if (($mods = cache_get_data('mods_credits', 86400)) === null)
 	{
 		$mods = array();
@@ -715,6 +714,7 @@ function Credits($in_admin = false)
 				'empty' => '',
 			)
 		);
+		
 		while ($row = $smcFunc['db_fetch_assoc']($request))
 		{
 			$credit_info = unserialize($row['credits']);
@@ -730,9 +730,22 @@ function Credits($in_admin = false)
 		}
 		cache_put_data('mods_credits', $mods, 86400);
 	}
-
-	$context['copyrights']['mods'] += $mods;
-
+	$context['credits_modifications'] = $mods;
+	
+	$context['copyrights'] = array(
+		'smf' => sprintf($forum_copyright, $forum_version),
+		/* Modification Authors:  You may add a copyright statement to this array for your mods.
+			Copyright statements should be in the form of a value only without a array key.  I.E.:
+				'Some Mod by Thantos &copy; 2010',
+				$txt['some_mod_copyright'],
+		*/
+		'mods' => array(
+		),
+	);
+	
+	// Support for those that want to use a hook as well
+	call_integration_hook('integrate_credits');
+	
 	if (!$in_admin)
 	{
 		loadTemplate('Who');
@@ -740,9 +753,6 @@ function Credits($in_admin = false)
 		$context['robot_no_index'] = true;
 		$context['page_title'] = $txt['credits'];
 	}
-
-	// Support for those that want to use a hook as well
-	call_integration_hook('integrate_credits');
 }
 
 ?>

+ 55 - 9
Themes/default/Who.template.php

@@ -193,7 +193,62 @@ function template_credits()
 			<span class="botslice"><span></span></span>
 		</div>';
 	}
+	
+	// Other software and graphics
+	if (!empty($context['credits_software_graphics']))
+	{
+		echo '
+		<div class="cat_bar">
+			<h3 class="catbg">', $txt['credits_software_graphics'], '</h3>
+		</div>
+		<div class="windowbg">
+			<span class="topslice"><span></span></span>
+			<div class="content">';
+		
+		if (!empty($context['credits_software_graphics']['graphics']))
+			echo '
+				<dl>
+					<dt><strong>', $txt['credits_graphics'], '</strong></dt>
+					<dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd>
+				</dl>';
+		
+		if (!empty($context['credits_software_graphics']['software']))
+			echo '
+				<dl>
+					<dt><strong>', $txt['credits_software'], '</strong></dt>
+					<dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd>
+				</dl>';
+	
+		echo '
+			</div>
+			<span class="botslice"><span></span></span>
+		</div>';
+	}
+	
+	// How about Modifications, we all love em
+	if (!empty($context['credits_modifications']))
+	{
+		echo '
+		<div class="cat_bar">
+			<h3 class="catbg">', $txt['credits_modifications'], '</h3>
+		</div>
+		<div class="windowbg">
+			<span class="topslice"><span></span></span>
+			<div class="content">';
+				
+		echo '
+				<dl>
+					<dt><strong>', $txt['credits_modifications'], '</strong></dt>
+					<dd>', implode('</dd><dd>', $context['credits_modifications']), '</dd>
+				</dl>';
+		
+		echo '
+			</div>
+			<span class="botslice"><span></span></span>
+		</div>';
+	}
 
+	// SMF itself
 	echo '
 		<div class="cat_bar">
 			<h3 class="catbg">', $txt['credits_copyright'], '</h3>
@@ -209,15 +264,6 @@ function template_credits()
 					</dd>
 				</dl>';
 				
-	if (!empty($context['copyrights']['other']))
-	{
-		echo '
-				<dl>
-					<dt><strong>', $txt['credits_other'], '</strong></dt>
-					<dd>', implode('</dd><dd>', $context['copyrights']['other']), '</dd>
-				</dl>';
-	}
-
 	if (!empty($context['copyrights']['mods']))
 	{
 		echo '

+ 3 - 1
Themes/default/languages/Who.english.php

@@ -135,7 +135,9 @@ $txt['credits_anyone'] = 'And for anyone we may have missed, thank you!';
 $txt['credits_copyright'] = 'Copyrights';
 $txt['credits_forum'] = 'Forum';
 $txt['credits_modifications'] = 'Modifications';
-$txt['credits_other'] = 'Software/Graphics';
+$txt['credits_software_graphics'] = 'Software/Graphics';
+$txt['credits_software'] = 'Software';
+$txt['credits_graphics'] = 'Graphics';
 $txt['credits_groups_ps'] = 'Project Support';
 $txt['credits_groups_dev'] = 'Developers';
 $txt['credits_groups_support'] = 'Support Specialists';