Permalink
Browse files

Merged Mario to Trunk

Completed: Issue 176 - New Launch Page - view game link not in color box

Completed: Issue 178 - No message after game deletion

Completed: Issue 170 - Allow parsing of shorturls from Youtube

Completed: Issue 168 - Create new report - Games with no trailers linked

Completed: Issue 169 - Create new report - Games with no screenshot uploaded

Completed: Issue 154 - Unused game ID's shouldn't be accessible.

Hotfix: Changed relevant error messages to be standard info messages, systemwide - This is a finalization of a process which has slowly been getting fixed
  • Loading branch information...
1 parent 614bea8 commit d743f2a47baae68f74b1808ace2a18d9dd5064c1 alex@penoval.co.uk committed Jul 23, 2011
Showing with 115 additions and 16 deletions.
  1. +14 −3 index.php
  2. +6 −3 js/fullscreenslider/css/style.css
  3. +3 −3 js/fullscreenslider/js/script.js
  4. +61 −1 tab_adminstats.php
  5. +29 −6 tab_game.php
  6. +2 −0 tab_stats.php
View
@@ -254,7 +254,7 @@
$sql = "INSERT INTO audits values(NULL, {$_SESSION['userid']}, 'updated', $id, NULL)";
mysql_query($sql);
}
- $errormessage .= 'Game saved.';
+ $message .= 'Game saved.';
$id = $newshowid;
$tab = 'game';
@@ -525,7 +525,7 @@
$id = mysql_real_escape_string($id);
$query = "UPDATE banners SET languageid=$languageid WHERE id=$id";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
- $errormessage = 'Banner Language Changed.';
+ $message = 'Banner Language Changed.';
}
@@ -682,7 +682,7 @@
if ($agreecheck) {
$query = "UPDATE users SET banneragreement=1 WHERE id=$user->id";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
- $errormessage = 'Thank you for agreeing to the site terms. You may now upload banners';
+ $message = 'Thank you for agreeing to the site terms. You may now upload banners';
$tab = 'mainmenu';
}
}
@@ -1389,6 +1389,8 @@ function DisplayImporterRow (importerValue) {
color: #fff;
text-decoration: underline;
}
+ .error { opacity: 0.7; font: bold 24px Helvetica, Arial, Sans-serif; text-shadow: 0px 2px 6px #333; color: red; width: 70%; margin: auto; margin-bottom: 20px; border: 2px solid #666; border-radius: 7px; padding: 15px; text-align: center; background: url(images/common/bg_orange.png) repeat-x center center;}
+ .message { opacity: 0.7; font: bold 24px Helvetica, Arial, Sans-serif; text-shadow: 0px 2px 6px #333; color: #fff; width: 70%; margin: auto; margin-bottom: 20px; border: 2px solid #666; border-radius: 7px; padding: 15px; text-align: center; background: url(images/common/bg_orange.png) repeat-x center center;}
</style>
<?php
@@ -1477,6 +1479,15 @@ function DisplayImporterRow (importerValue) {
<div style="position: absolute; top: 147px; background: url(images/bg_banner-shadow.png) repeat-x center center; height: 15px; width: 100%; z-index: 200;"></div>
+ <div id="messages" style="position: absolute; top: 160px; width: 100%;">
+ <?php if($errormessage): ?>
+ <div class="error"><?= $errormessage ?></div>
+ <?php endif; ?>
+ <?php if($message): ?>
+ <div class="message"><?= $message ?></div>
+ <?php endif; ?>
+ </div>
+
<div id="frontContentWrapper" style="position: absolute; top: 34%; width: 100%; height: 200px; z-index: 200;">
<div id="frontContent" style="opacity: 1; width: 600px; height: 160px; padding: 10px 30px; margin: auto; background: url(images/bg_frontsearch.png) repeat-x center center; border-radius: 16px; border: 0px solid #333;">
@@ -19,16 +19,19 @@ body { overflow:hidden; }
#pictureSlider div { height:100%; width:100%; position:absolute; z-index:-999; }
/* NAVIGATION BOX */
-.navbox { width:450px; height:120px; position:absolute; left:0px; bottom:50px; opacity: 0.7; }
+.navbox { width:450px; height:124px; position:absolute; left:0px; bottom:50px; opacity: 0.7; }
.navbox ul { list-style:none; position:absolute; right:10px; top:10px; }
.navbox ul li { display:inline; cursor:pointer; }
.navbox ul li a { display:block; float:left; width:17px; height:17px; text-align:center; background-image:url("../images/nav_btns.png"); margin-left:5px;
text-decoration:none; color:#eee; font: bold 14px Helvetica, Arial, Sans-serif; line-height:18px; }
.navbox ul li a:hover { background-position:bottom; color:#000; }
.navbox ul li a.active { color:#777; }
-.navbox h2 { padding:20px 20px 0 20px; font: bold 26px Helvetica, Arial, Sans-serif; text-shadow: 0px 2px 6px #333; color:#eee; }
-.navbox p { padding:10px 20px 20px 20px; height: 15px; overflow: hidden; font-family: "Segoe UI","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Arial,Tahoma,Verdana,sans-serif; font-size:17px; text-shadow: 0px 2px 6px #333; color:#eee; }
+.navbox h2 { padding:26px 20px 0 20px; font: bold 24px Helvetica, Arial, Sans-serif; height: 58px; text-shadow: 0px 2px 6px #333; color:#eee; }
+.navbox h2 a{ font: bold 24px Helvetica, Arial, Sans-serif; text-shadow: 0px 2px 6px #333; color:#eee; text-decoration: none;}
+.navbox h2 a:visited{ font: bold 24px Helvetica, Arial, Sans-serif; text-shadow: 0px 2px 6px #333; color:#eee; }
+.navbox h2 a:link{ font: bold 24px Helvetica, Arial, Sans-serif; text-shadow: 0px 2px 6px #333; color:#eee; }
+.navbox p { padding:6px 0px 0px 20px; height: 20px; overflow: hidden; font-family: "Segoe UI","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Arial,Tahoma,Verdana,sans-serif; font-size:17px; text-shadow: 0px 2px 6px #333; color:#eee; }
.navbox p a { text-decoration:none; text-transform:uppercase; letter-spacing: 6px; color:#eee; }
.navbox p a:hover { border-bottom:1px dotted; }
.navbox p.bottom { position:absolute; padding: 0px; height: 20px; bottom:0x; right:5px; font-size: 12px }
@@ -30,7 +30,7 @@ $(function() {
});*/
// Add the navigation boxes
- $.template("navboxTemplate", "<div class='navbox ${cssclass}'><ul></ul><h2>${title}</h2><p>${text}</p><p class='bottom'><a href='${url}' title='${title}'>${urltext}</a></p></div>");
+ $.template("navboxTemplate", "<div class='navbox ${cssclass}'><ul></ul><h2><a href='${url}' title='${title}'>${title}</a></h2><p>${text}</p></div>");
$.tmpl("navboxTemplate", photos).appendTo("#navigationBoxes");
// Add the navigation, based on the Photos
@@ -67,7 +67,7 @@ $(function() {
});
// Hide all the navigation boxes, except the one from current index
- $(".navbox:not(:eq(" + activeIndex +"))").css('left', '-450px');
+ $(".navbox:not(:eq(" + activeIndex +"))").css('left', '-550px');
// Set the proper background image, based on the active index
$("<div />")
@@ -113,7 +113,7 @@ $(function() {
// Hide the current navigation box
$(".navbox").eq(activeIndex)
.css({ 'z-index' : '998' }) // Push back
- .animate({ left : '-450px' }, animationSpeed, easing);
+ .animate({ left : '-550px' }, animationSpeed, easing);
// Show the accompanying navigation box
$(".navbox").eq(imageIndex)
View
@@ -316,7 +316,67 @@
</tr>
</table>
<?php
- break;
+ break;
+
+ case "missingscreenshot":
+ ?>
+ <h2 class="arcade" style="color: #FF4F00;">Games Missing Screenshots</h2>
+ <table align="center" border="1" cellspacing="0" cellpadding="7">
+ <tr>
+ <th style="background-color: #333; color: #FFF;">Game ID</th>
+ <th style="background-color: #333; color: #FFF;">Game Title</th>
+ <th style="background-color: #333; color: #FFF;">Platform</th>
+ </tr>
+ <?php
+ $missingcount = 0;
+ $result = mysql_query(" SELECT games.id, games.GameTitle, platforms.name FROM games, platforms WHERE NOT EXISTS (SELECT keyvalue FROM banners WHERE banners.keyvalue = games.id AND banners.keytype = 'screenshot') AND games.Platform = platforms.id ORDER BY games.GameTitle ASC ");
+ while($row = mysql_fetch_assoc($result)) {
+ ?>
+ <tr>
+ <td><?php echo $row[id]; ?></td>
+ <td align="left"><a href="?tab=game&id=<?php echo $row[id]; ?>&lid=1"><?php echo $row[GameTitle]; ?></a></td>
+ <td><?php echo $row[name]; ?></td>
+ </tr>
+ <?php
+ $missingcount++;
+ }
+ ?>
+ <tr>
+ <td colspan="3" style="background-color: #EEE; font-weight: bold;" >Total Games Missing Screenshots: <?php echo $missingcount; ?></td>
+ </tr>
+ </table>
+ <?php
+ break;
+
+ case "missingyoutube":
+ ?>
+ <h2 class="arcade" style="color: #FF4F00;">Games Missing Youtube Trailers</h2>
+ <table align="center" border="1" cellspacing="0" cellpadding="7">
+ <tr>
+ <th style="background-color: #333; color: #FFF;">Game ID</th>
+ <th style="background-color: #333; color: #FFF;">Game Title</th>
+ <th style="background-color: #333; color: #FFF;">Platform</th>
+ </tr>
+ <?php
+ $missingcount = 0;
+ $result = mysql_query(" SELECT games.id, games.GameTitle, platforms.name FROM games, platforms WHERE (games.Youtube IS NULL OR games.Youtube = '') AND games.Platform = platforms.id ORDER BY games.GameTitle ASC ");
+ while($row = mysql_fetch_assoc($result)) {
+ ?>
+ <tr>
+ <td><?php echo $row[id]; ?></td>
+ <td align="left"><a href="?tab=game&id=<?php echo $row[id]; ?>&lid=1"><?php echo $row[GameTitle]; ?></a></td>
+ <td><?php echo $row[name]; ?></td>
+ </tr>
+ <?php
+ $missingcount++;
+ }
+ ?>
+ <tr>
+ <td colspan="3" style="background-color: #EEE; font-weight: bold;" >Total Games Missing Youtube Trailers: <?php echo $missingcount; ?></td>
+ </tr>
+ </table>
+ <?php
+ break;
}
}
View
@@ -5,6 +5,7 @@
$id = mysql_real_escape_string($id);
$query = "SELECT * FROM games WHERE id=$id";
$result = mysql_query($query) or die('Query1 failed: ' . mysql_error());
+$rows = mysql_num_rows($result);
$game = mysql_fetch_object($result);
global $user;
@@ -33,6 +34,11 @@
?>
+<?php
+if($rows != 0)
+{
+?>
+
<script type="text/javascript">
$(document).ready(function(){
$('#ReleaseDate').datepicker({ changeYear: true, yearRange: '1950:2020' });
@@ -160,16 +166,20 @@
<tr>
<td><strong>Youtube Trailer:</strong></td>
<td>
- <input type="text" size="46" id="Youtube" name="Youtube" value="<?=$game->Youtube?>" onblur="$('#Youtube').val($('#Youtube').val().replace('http://www.youtube.com/watch?v=', '')); $('#Youtube').val($('#Youtube').val().replace('www.youtube.com/watch?v=', '')); $('#Youtube').val($('#Youtube').val().replace('youtube.com/watch?v=', ''));" />&nbsp;<a rel="facebox" href="#youtubeGuide">Guidelines<br />
+ <input type="text" size="46" id="Youtube" name="Youtube" value="<?=$game->Youtube?>" onblur="$('#Youtube').val($('#Youtube').val().replace('http://www.youtube.com/watch?v=', '')); $('#Youtube').val($('#Youtube').val().replace('www.youtube.com/watch?v=', '')); $('#Youtube').val($('#Youtube').val().replace('youtube.com/watch?v=', '')); $('#Youtube').val($('#Youtube').val().replace('http://youtu.be/', '')); $('#Youtube').val($('#Youtube').val().replace('http://www.youtu.be/', '')); $('#Youtube').val($('#Youtube').val().replace('www.youtu.be/', '')); " />&nbsp;<a rel="facebox" href="#youtubeGuide">Guidelines<br />
<?php if ($game->Youtube != "") { ?>
- <div><a rel="shadowbox;width=640;height=390" href="http://www.youtube.com/embed/<?=str_replace("&", "?", "$game->Youtube")?>"><img src="images/common/icons/play_24.png" alt="Open in Youtube" style="padding-right: 3px; vertical-align: -7px;" />Watch Here</a><span style="padding: 0px 12px;"><em>or</em></span><a href="http://www.youtube.com/watch?v=<?=$game->Youtube?>" target="_blank"><img src="images/common/icons/link_24.png" alt="Open in Youtube" style="padding-right: 3px; vertical-align: -7px;" />Open in Youtube</a></div>
+ <div><a rel="shadowbox;width=853;height=510" href="http://www.youtube.com/embed/<?=str_replace("&", "?", "$game->Youtube")?>"><img src="images/common/icons/play_24.png" alt="Open in Youtube" style="padding-right: 3px; vertical-align: -7px;" />Watch Here</a><span style="padding: 0px 12px;"><em>or</em></span><a href="http://www.youtube.com/watch?v=<?=$game->Youtube?>" target="_blank"><img src="images/common/icons/link_24.png" alt="Open in Youtube" style="padding-right: 3px; vertical-align: -7px;" />Open in Youtube</a></div>
<?php } ?>
<div id="youtubeGuide" style="display: none; color: #fff;">
<h2><img src="images/common/icons/upload-black_32.png" alt="Upload" style="vertical-align: -7px;" /> Youtube Trailer Guidelines</h2>
<h3>Please read these guidelines carefully before adding a Youtube Trailer.</h3>
- <p>The only part of the link you need to input from youtube is the video id. We handle everything else automatically.</p>
- <p style="font-weight: bold;">Example of Valid Youtube Video ID's:</p>
- <p>Take the url of a standard youtube video page such as this for instance:</p><p style="text-align: center;">http://www.youtube.com/watch?v=<strong><em>BrtpflukHSg</em></strong>&amp;hd=1</p>
+ <p>This facility is for linking to trailers for games which exist on Youtube.</p>
+ <p>For older games that do not have trailers, we will allow linking of a good quality video which demonstrates the gameplay of the game.</p>
+ <h3>Valid URL's</h3>
+ <p>Both standard Youtube URL's and Youtube shorturls are accepted.</p>
+ <p style="font-weight: bold;">Examples:</p>
+ <p style="text-align: center;">http://www.youtube.com/watch?v=<strong><em>BrtpflukHSg</em></strong>&amp;hd=1</p>
+ <p style="text-align: center;">http://youtu.be/<strong><em>BrtpflukHSg</em></strong></p>
<p>The Video ID portion of the url above is highlighted <strong><em>like this.</em></strong></p>
<p style="text-align: center;"><strong><em>BrtpflukHSg</em></strong> and <strong><em>BrtpflukHSg&amp;hd=1</em></strong> are both valid id's.</p>
<p><em>In fact, the one containing <strong><em>&amp;hd=1</em></strong> is preferred as it enables HD playback by default.</em></p>
@@ -1022,4 +1032,17 @@
easing: 'easeInOutExpo'
});
});
- </script>
+ </script>
+<?php
+ }
+ else
+ {
+?>
+ <p>&nbsp;</p>
+ <h1 class="arcade" style="text-align: center;">Game Information</h1>
+ <p>&nbsp;</p>
+ <p style="text-align: center;">Sorry, there is no game that exists for game id #<?=$id?>.</p>
+ <p>&nbsp;</p>
+<?php
+ }
+?>
View
@@ -28,5 +28,7 @@
<p><a href="?tab=adminstats&statstype=missingback">Games Missing Back Boxart</a></p>
<p><a href="?tab=adminstats&statstype=missingfanart">Games Missing Fanart</a></p>
<p><a href="?tab=adminstats&statstype=missingbanner">Games Missing Banners</a></p>
+ <p><a href="?tab=adminstats&statstype=missingscreenshot">Games Missing Screenshots</a></p>
+ <p><a href="?tab=adminstats&statstype=missingyoutube">Games Missing Youtube Trailers</a></p>
</div>

0 comments on commit d743f2a

Please sign in to comment.