 |
 |
 |
 |
#278762 - 10/13/04 03:48 AM
Re: Finished-[6.5] Games Arcade Deluxe v1.6
[Re: 234234]
|
Newbie
Registered: 10/26/02
Posts: 24
Loc: Westminster, CO, USA
|
I wanted there to be a trophy icon next to the nick of any user who had a high score in the arcade. I made these changes:<br /><br />showflat.php<br /><br />Find:<br />[]<br />// ------------------------------------------------<br />// Keep the current thread number for page linking<br />$pagelinker = $current;<br />[/]<br /><br />Under this add:<br />[]<br />// ---------------------------------<br />// Get the top scores for the arcade<br />$query = "<br /> SELECT title,<br /> SUBSTRING(MAX(CONCAT(LPAD(score,6,'0'),userid)), 7) AS userid,<br /> 0.00 + LEFT(MAX(CONCAT(LPAD(score,6,'0'),userid)), 6) AS score<br /> FROM w3t_gamesessions, w3t_games<br /> WHERE (w3t_gamesessions.gamename = w3t_games.shortname)<br /> GROUP BY gamename;<br />";<br />$sth = $dbh -> do_query($query,__LINE__,__FILE__);<br />while (list($title,$userid,$score) = $dbh -> fetch_array($sth)) {<br /> $topscores[$title] = $userid;<br />}<br />$dbh -> finish_sth($sth);<br />[/]<br /><br />Find this:<br />[]<br /> // ---------------------<br /> // Is it their birthday?<br /> if ($showbday) {<br /> if (preg_match("/^$month\/$day\//",$bday)) {<br /> $Username = "<img src=\"{$config['images']}/birthday.gif\" alt=\"{$ubbt_lang['HAPPYBDAY']}\" title=\"{$ubbt_lang['HAPPYBDAY']}\" />$Username";<br /> }<br /> }<br />[/]<br /><br />Under this add:<br />[]<br /> // ----------------------------------------<br /> // Do they have a high score in the arcade?<br /> <br /> $temparray = array_keys($topscores, $usernum);<br /> asort($temparray);<br /> $trophyalt = "";<br /> <br /> while(list($key,$game) = each($temparray)) {<br /> if ($trophyalt){<br /> $trophyalt .= ", ";<br /> } <br /> $trophyalt .= "$game";<br /> }<br /> <br /> if ($trophyalt){<br /> $Username .= "<a href=\"{$config['phpurl']}/arcade/arcade.php?do=newchallenge&userid=$usernum\"><img border=\"0\" src=\"{$config['phpurl']}/arcade/images/trophy.gif\" alt=\"Arcade Champion: $trophyalt\" title=\"Arcade Champion: $trophyalt\" /></a>";<br /> }<br />[/]<br /><br />showthreaded.php<br /><br />Find this:<br />[]<br />$jumpbox = $html -> jump_box($Cat,$groupquery,$Board);<br />[/]<br /><br />Under this add:<br />[]<br />// ---------------------------------<br />// Get the top scores for the arcade<br />$query = "<br /> SELECT title,<br /> SUBSTRING(MAX(CONCAT(LPAD(score,6,'0'),userid)), 7) AS userid,<br /> 0.00 + LEFT(MAX(CONCAT(LPAD(score,6,'0'),userid)), 6) AS score<br /> FROM w3t_gamesessions, w3t_games<br /> WHERE (w3t_gamesessions.gamename = w3t_games.shortname)<br /> GROUP BY gamename;<br />";<br />$sth = $dbh -> do_query($query,__LINE__,__FILE__);<br />while (list($title,$userid,$score) = $dbh -> fetch_array($sth)) {<br /> $topscores[$title] = $userid;<br />}<br />$dbh -> finish_sth($sth);<br />[/]<br /><br />Find:<br />[]<br />// ---------------------<br />// Is it their birthday?<br />if ($showbday) {<br /> if (preg_match("/^$month\/$day\//",$bday)) {<br /> $Username .= "<img src=\"{$config['images']}/birthday.gif\" alt=\"{$ubbt_lang['HAPPYBDAY']}\" title=\"{$ubbt_lang['HAPPYBDAY']}\" />";<br /> }<br />}<br />[/]<br /><br />Under this add:<br />[]<br /> // ----------------------------------------<br /> // Do they have a high score in the arcade?<br /> <br /> $temparray = array_keys($topscores, $usernum);<br /> asort($temparray);<br /> $trophyalt = "";<br /> <br /> while(list($key,$game) = each($temparray)) {<br /> if ($trophyalt){<br /> $trophyalt .= ", ";<br /> } <br /> $trophyalt .= "$game";<br /> }<br /> <br /> if ($trophyalt){<br /> $Username .= "<img src=\"{$config['phpurl']}/arcade/images/trophy.gif\" alt=\"Arcade Champion: $trophyalt\" title=\"Arcade Champion: $trophyalt\" />";<br /> }<br />[/]
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#278764 - 10/13/04 08:00 AM
Re: Finished-[6.5] Games Arcade Deluxe v1.6
[Re: yoki]
|
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
|
[]Ythan said:<br />I wanted there to be a trophy icon next to the nick of any user who had a high score in the arcade. I made these changes:<br /><br />showflat.php<br /><br />Find:<br />[]<br />// ------------------------------------------------<br />// Keep the current thread number for page linking<br />$pagelinker = $current;<br />[/]<br /><br />Under this add:<br />[]<br />// ---------------------------------<br />// Get the top scores for the arcade<br />$query = "<br /> SELECT title,<br /> SUBSTRING(MAX(CONCAT(LPAD(score,6,'0'),userid)), 7) AS userid,<br /> 0.00 + LEFT(MAX(CONCAT(LPAD(score,6,'0'),userid)), 6) AS score<br /> FROM w3t_gamesessions, w3t_games<br /> WHERE (w3t_gamesessions.gamename = w3t_games.shortname)<br /> GROUP BY gamename;<br />";<br />$sth = $dbh -> do_query($query,__LINE__,__FILE__);<br />while (list($title,$userid,$score) = $dbh -> fetch_array($sth)) {<br /> $topscores[$title] = $userid;<br />}<br />$dbh -> finish_sth($sth);<br />[/]<br /><br />Find this:<br />[]<br /> // ---------------------<br /> // Is it their birthday?<br /> if ($showbday) {<br /> if (preg_match("/^$month\/$day\//",$bday)) {<br /> $Username = "<img src=\"{$config['images']}/birthday.gif\" alt=\"{$ubbt_lang['HAPPYBDAY']}\" title=\"{$ubbt_lang['HAPPYBDAY']}\" />$Username";<br /> }<br /> }<br />[/]<br /><br />Under this add:<br />[]<br /> // ----------------------------------------<br /> // Do they have a high score in the arcade?<br /> <br /> $temparray = array_keys($topscores, $usernum);<br /> asort($temparray);<br /> $trophyalt = "";<br /> <br /> while(list($key,$game) = each($temparray)) {<br /> if ($trophyalt){<br /> $trophyalt .= ", ";<br /> } <br /> $trophyalt .= "$game";<br /> }<br /> <br /> if ($trophyalt){<br /> $Username .= "<a href=\"{$config['phpurl']}/arcade/arcade.php?do=newchallenge&userid=$usernum\"><img border=\"0\" src=\"{$config['phpurl']}/arcade/images/trophy.gif\" alt=\"Arcade Champion: $trophyalt\" title=\"Arcade Champion: $trophyalt\" /></a>";<br /> }<br />[/]<br /><br />showthreaded.php<br /><br />Find this:<br />[]<br />$jumpbox = $html -> jump_box($Cat,$groupquery,$Board);<br />[/]<br /><br />Under this add:<br />[]<br />// ---------------------------------<br />// Get the top scores for the arcade<br />$query = "<br /> SELECT title,<br /> SUBSTRING(MAX(CONCAT(LPAD(score,6,'0'),userid)), 7) AS userid,<br /> 0.00 + LEFT(MAX(CONCAT(LPAD(score,6,'0'),userid)), 6) AS score<br /> FROM w3t_gamesessions, w3t_games<br /> WHERE (w3t_gamesessions.gamename = w3t_games.shortname)<br /> GROUP BY gamename;<br />";<br />$sth = $dbh -> do_query($query,__LINE__,__FILE__);<br />while (list($title,$userid,$score) = $dbh -> fetch_array($sth)) {<br /> $topscores[$title] = $userid;<br />}<br />$dbh -> finish_sth($sth);<br />[/]<br /><br />Find:<br />[]<br />// ---------------------<br />// Is it their birthday?<br />if ($showbday) {<br /> if (preg_match("/^$month\/$day\//",$bday)) {<br /> $Username .= "<img src=\"{$config['images']}/birthday.gif\" alt=\"{$ubbt_lang['HAPPYBDAY']}\" title=\"{$ubbt_lang['HAPPYBDAY']}\" />";<br /> }<br />}<br />[/]<br /><br />Under this add:<br />[]<br /> // ----------------------------------------<br /> // Do they have a high score in the arcade?<br /> <br /> $temparray = array_keys($topscores, $usernum);<br /> asort($temparray);<br /> $trophyalt = "";<br /> <br /> while(list($key,$game) = each($temparray)) {<br /> if ($trophyalt){<br /> $trophyalt .= ", ";<br /> } <br /> $trophyalt .= "$game";<br /> }<br /> <br /> if ($trophyalt){<br /> $Username .= "<img src=\"{$config['phpurl']}/arcade/images/trophy.gif\" alt=\"Arcade Champion: $trophyalt\" title=\"Arcade Champion: $trophyalt\" />";<br /> }<br />[/] [/]<br /><br />good stuff <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.ccMy abilities are for hire for installs, upgrades, custom themes and custom modifications.
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|