better code
parent
0259e35fcc
commit
7c2d9b87e3
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require "medal_types.php";
|
require_once "medal_types.php";
|
||||||
|
|
||||||
echo "<li style=\"margin-top:10px;\">\n";
|
echo "<li style=\"margin-top:10px;\">\n";
|
||||||
|
|
||||||
|
@ -9,12 +9,21 @@ $medals_i=$cur_post['medals'];
|
||||||
$medals=explode(",",$medals_i);
|
$medals=explode(",",$medals_i);
|
||||||
|
|
||||||
while (list($key,$val)=each($medals)){
|
while (list($key,$val)=each($medals)){
|
||||||
$med_img="q";
|
if ($val!=""){
|
||||||
|
$med_img="medal_q.png";
|
||||||
|
$med_titl=$val;
|
||||||
|
|
||||||
if (isset($medal_types[strtolower($val)]))
|
if (isset($medal_types[strtolower($val)]['name']))
|
||||||
$med_img=$medal_types[strtolower($val)];
|
$med_titl=$medal_types[strtolower($val)]['name'];
|
||||||
|
|
||||||
echo "<img src=\"img/medal_$med_img.png\" title=\"$val\">\n";
|
if (isset($medal_types[strtolower($val)]['image']))
|
||||||
|
$med_img=$medal_types[strtolower($val)]['image'];
|
||||||
|
|
||||||
|
if (isset($medal_types[strtolower($val)]['description']))
|
||||||
|
$med_titl.=" - ".$medal_types[strtolower($val)]['description'];
|
||||||
|
|
||||||
|
echo "<img src=\"img/$med_img\" title=\"$med_titl\">\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</li>\n";
|
echo "</li>\n";
|
||||||
|
|
|
@ -1,35 +1,77 @@
|
||||||
<?php
|
<?php
|
||||||
// WHAT DOES THIS MEAN?
|
// WHAT DOES THIS MEAN?
|
||||||
// [medal name] => [icon_name]
|
// [medal id] => [name of medal], [icon of medal], [description]
|
||||||
// An icon name of "foo" would made the medal icon be: img/medal_foo.png
|
// An icon name of "medal_foo.png" would make the medal icon be: img/medal_foo.png
|
||||||
|
|
||||||
$medal_types = array(
|
$medal_types = array(
|
||||||
|
|
||||||
// How many mods have they made?
|
|
||||||
"first mod" => "bronze", // has made a mod
|
|
||||||
"many mods" => "silver", // has made over 5 mods
|
|
||||||
"mod factory" => "gold", // has made over 10 mods
|
|
||||||
|
|
||||||
// How creative are their mods?
|
// Mods
|
||||||
"mod pioneer" => "silver", // has made a mod considered innovative
|
"first mod" => array(
|
||||||
"master mod pioneer" => "gold", //has made 7 or more mods considered innovative
|
"name" => "First Mod",
|
||||||
|
"image" => "medal_bronze.png",
|
||||||
|
"description" => "has made a mod",
|
||||||
|
),
|
||||||
|
"mod pioneer" => array(
|
||||||
|
"name" => "Mod Pioneer",
|
||||||
|
"image" => "medal_inno.png",
|
||||||
|
"description" => "an innovative mod maker: thinks outside of the box",
|
||||||
|
),
|
||||||
|
"modf" => array(
|
||||||
|
"name" => "Mod Factory",
|
||||||
|
"image" => "medal_modf.png",
|
||||||
|
"description" => "has made 10 or more mods",
|
||||||
|
),
|
||||||
|
|
||||||
// How many servers do they have?
|
|
||||||
"first server" => "bronze", // owns a server
|
|
||||||
"server owner" => "gold", // owns 2 or more servers
|
|
||||||
"master server owner" => "gold", // owns 3 or more servers
|
|
||||||
|
|
||||||
// How popular is their server?
|
|
||||||
"server owner" => "bronze", // owns an active server
|
|
||||||
"big server owner" => "silver", // owns a server with over a 500 replies
|
|
||||||
"mega server owner" => "gold", // owns a server with over a 1000 replies
|
|
||||||
|
|
||||||
// Have they won a competition?
|
|
||||||
"competition winner" => "gold", // won a competition
|
|
||||||
|
|
||||||
// How much do they contribute?
|
// Servers
|
||||||
"contributer" => "gold", // someone who has contributed a lot to the development, whether that be c++, mods or other
|
"server owner" => array(
|
||||||
"developer" => "silver", // someone who has done some c++ contribution
|
"name" => "Server Owner",
|
||||||
"master developer" => "gold", // someone who has done a lot of c++ contribution
|
"image" => "medal_bronze.png",
|
||||||
|
"description" => "owns an active server",
|
||||||
|
),
|
||||||
|
"popular host" => array(
|
||||||
|
"name" => "Popular Host",
|
||||||
|
"image" => "medal_silver.png",
|
||||||
|
"description" => "owns a server with over 500 replies",
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Competition
|
||||||
|
"comp_2" => array(
|
||||||
|
"name" => "Competition Runner Up",
|
||||||
|
"image" => "medal_comp_2.png",
|
||||||
|
"description" => "came second in a competition",
|
||||||
|
),
|
||||||
|
"comp_1" => array(
|
||||||
|
"name" => "Competition Winner",
|
||||||
|
"image" => "medal_comp.png",
|
||||||
|
"description" => "came first in a competition",
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Contribution and Development
|
||||||
|
"rainbow award" => array(
|
||||||
|
"name" => "Rainbow Award",
|
||||||
|
"image" => "medal_rainbow.png",
|
||||||
|
"description" => "helps other players with their problems",
|
||||||
|
),
|
||||||
|
|
||||||
|
"nyan cat award" => array(
|
||||||
|
"name" => "Nyan Cat Award",
|
||||||
|
"image" => "medal_nyan.png",
|
||||||
|
"description" => "has done something that helps the community move forward",
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue