From 4a160355c7f2334b4bd578443e866fce9ddbedda Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 7 Apr 2011 23:37:56 +0000 Subject: [PATCH] - updated masterserver files to send image preview URL's to client for mod menu --- source/masterserver/createDB.sql | 4 ++++ source/masterserver/showMapsForGlest.php | 2 +- source/masterserver/showScenariosForGlest.php | 2 +- source/masterserver/showTechsForGlest.php | 2 +- source/masterserver/showTilesetsForGlest.php | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/masterserver/createDB.sql b/source/masterserver/createDB.sql index 4160a79b..ba5a7e3f 100755 --- a/source/masterserver/createDB.sql +++ b/source/masterserver/createDB.sql @@ -37,6 +37,7 @@ CREATE TABLE IF NOT EXISTS `glestmaps` ( `crc` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `url` varchar(1024) COLLATE utf8_unicode_ci NOT NULL, + `imageUrl` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL, `disabled` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`mapname`), KEY `mapname` (`mapname`) @@ -49,6 +50,7 @@ CREATE TABLE IF NOT EXISTS `glesttilesets` ( `crc` varchar(100) collate utf8_unicode_ci, `description` varchar(255) collate utf8_unicode_ci, `url` varchar(1024) collate utf8_unicode_ci NOT NULL, + `imageUrl` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL, `disabled` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`tilesetname`), KEY `tilesetname` (`tilesetname`) @@ -62,6 +64,7 @@ CREATE TABLE IF NOT EXISTS `glesttechs` ( `crc` varchar(100) collate utf8_unicode_ci, `description` varchar(255) collate utf8_unicode_ci, `url` varchar(1024) collate utf8_unicode_ci NOT NULL, + `imageUrl` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL, `disabled` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`techname`), KEY `techname` (`techname`) @@ -75,6 +78,7 @@ CREATE TABLE IF NOT EXISTS `glestscenarios` ( `crc` varchar(100) collate utf8_unicode_ci, `description` varchar(255) collate utf8_unicode_ci, `url` varchar(1024) collate utf8_unicode_ci NOT NULL, + `imageUrl` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL, `disabled` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`scenarioname`), KEY `scenarioname` (`scenarioname`) diff --git a/source/masterserver/showMapsForGlest.php b/source/masterserver/showMapsForGlest.php index 7e4ca69c..3db91d32 100644 --- a/source/masterserver/showMapsForGlest.php +++ b/source/masterserver/showMapsForGlest.php @@ -22,7 +22,7 @@ foreach( $all_maps as &$map ) { $outString = - "${map['mapname']}|${map['playercount']}|${map['crc']}|${map['description']}|${map['url']}|"; + "${map['mapname']}|${map['playercount']}|${map['crc']}|${map['description']}|${map['url']}|${map['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString); diff --git a/source/masterserver/showScenariosForGlest.php b/source/masterserver/showScenariosForGlest.php index b6056463..207a4e35 100644 --- a/source/masterserver/showScenariosForGlest.php +++ b/source/masterserver/showScenariosForGlest.php @@ -22,7 +22,7 @@ foreach( $all_scenarios as &$scenario ) { $outString = - "${scenario['scenarioname']}|${scenario['crc']}|${scenario['description']}|${scenario['url']}|"; + "${scenario['scenarioname']}|${scenario['crc']}|${scenario['description']}|${scenario['url']}|${map['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString); diff --git a/source/masterserver/showTechsForGlest.php b/source/masterserver/showTechsForGlest.php index cd40af16..92c0296d 100644 --- a/source/masterserver/showTechsForGlest.php +++ b/source/masterserver/showTechsForGlest.php @@ -22,7 +22,7 @@ foreach( $all_techs as &$tech ) { $outString = - "${tech['techname']}|${tech['factioncount']}|${tech['crc']}|${tech['description']}|${tech['url']}|"; + "${tech['techname']}|${tech['factioncount']}|${tech['crc']}|${tech['description']}|${tech['url']}|${map['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString); diff --git a/source/masterserver/showTilesetsForGlest.php b/source/masterserver/showTilesetsForGlest.php index 0eb8ef70..04771a91 100644 --- a/source/masterserver/showTilesetsForGlest.php +++ b/source/masterserver/showTilesetsForGlest.php @@ -22,7 +22,7 @@ foreach( $all_tilesets as &$tileset ) { $outString = - "${tileset['tilesetname']}|${tileset['crc']}|${tileset['description']}|${tileset['url']}|"; + "${tileset['tilesetname']}|${tileset['crc']}|${tileset['description']}|${tileset['url']}|${map['imageUrl']}|"; $outString = $outString . "\n"; echo ($outString);