├── log.conf ├── docs ├── game.png ├── pages.png ├── tree.png ├── studio.png ├── access_token.png ├── presskittie.png └── presskittie.xcf ├── code ├── images │ ├── logo.png │ ├── logo.zip │ ├── header.png │ ├── images.zip │ ├── screenshot-1.png │ ├── screenshot-2.png │ └── screenshot-3.png ├── controller.php ├── games │ └── a_fake_game │ │ ├── images │ │ ├── logo.png │ │ ├── logo.zip │ │ ├── header.png │ │ ├── images.zip │ │ ├── screenshot-1.png │ │ ├── screenshot-2.png │ │ ├── screenshot-3.png │ │ └── screenshot-4.png │ │ └── data.xml ├── style.css ├── credits.php ├── lang │ ├── TranslateTool.php │ └── en-English.xml ├── _template │ └── _data.xml ├── data.xml ├── create.php ├── index.php └── sheet.php ├── docker-compose.yml ├── default.conf ├── .github └── workflows │ └── build.yml ├── README.md └── install.php /log.conf: -------------------------------------------------------------------------------- 1 | php_admin_flag[log_errors] = on 2 | php_flag[display_errors] = off -------------------------------------------------------------------------------- /docs/game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/game.png -------------------------------------------------------------------------------- /docs/pages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/pages.png -------------------------------------------------------------------------------- /docs/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/tree.png -------------------------------------------------------------------------------- /docs/studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/studio.png -------------------------------------------------------------------------------- /code/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/code/images/logo.png -------------------------------------------------------------------------------- /code/images/logo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/code/images/logo.zip -------------------------------------------------------------------------------- /docs/access_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/access_token.png -------------------------------------------------------------------------------- /docs/presskittie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/presskittie.png -------------------------------------------------------------------------------- /docs/presskittie.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/docs/presskittie.xcf -------------------------------------------------------------------------------- /code/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/code/images/header.png -------------------------------------------------------------------------------- /code/images/images.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanuys/presskittie/HEAD/code/images/images.zip -------------------------------------------------------------------------------- /code/controller.php: -------------------------------------------------------------------------------- 1 | .github.io//` 66 | -------------------------------------------------------------------------------- /code/credits.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |

Short introduction by Vlambeers Rami Ismail

7 |

Even though I\'m still not quite sure what to call presskit() - be it a kit or a system or a framework or just a way for me to spend more time making games and less time doing repetitive chores, I ended up making this because I felt it would make a lot of lives a lot easier.

8 |

A good game is worth nothing if no-one plays it & to play a game one needs to know of it. The way I see it, developers & press both have the same goal: to bring great games to as many people as possible. For the press, finding out about a game but not having access to information & media for the game means that they still can\'t really write something about it. Developers want to spend their valuable time making games instead of press pages, resulting in that so many games that could\'ve touched so many hearts didn\'t end up doing so.

9 |

I figured that something that is free for everyone, open and easy-to-use for both sides is the ultimate solution. Developers only have to spend an hour or so creating well-laid out press pages with everything the press needs to write to their hearts desire. Everyone wins.

10 |

But presskit() was only possible thanks to these fine folks!

11 | 25 |
26 | -------------------------------------------------------------------------------- /code/lang/TranslateTool.php: -------------------------------------------------------------------------------- 1 | 'English', 19 | ); 20 | if ($handle = opendir(dirname(__FILE__))) 21 | { 22 | while (false !== ($entry = readdir($handle))) 23 | { 24 | if (substr($entry,-4) == ".xml" ) 25 | { 26 | $info = explode('-', substr($entry,0, -4), 2); 27 | $languages[$info[0]] = $info[1]; 28 | } 29 | } 30 | } 31 | 32 | self::$_languages = $languages; 33 | self::$_defaultLanguage = key($languages); 34 | } 35 | return self::$_languages; 36 | } 37 | 38 | public static function loadLanguage($language, $file) 39 | { 40 | $languages = self::getLanguages(); 41 | 42 | if (!isset($languages[$language])) 43 | $language = self::$_defaultLanguage; 44 | 45 | self::$_language = $language; 46 | 47 | if (isset($languages[$language]) && file_exists(dirname(__FILE__) . '/'. $language .'-'. $languages[$language]. '.xml')) 48 | { 49 | $xml = simplexml_load_file(dirname(__FILE__) . '/'. $language .'-'. $languages[$language]. '.xml'); 50 | 51 | self::$_translations = array(); 52 | foreach ($xml as $set) 53 | { 54 | $setAttr = $set->attributes(); 55 | $setName = isset($setAttr['name']) ? $setAttr['name'] : 'default'; 56 | if (!isset($setAttr['filename']) || $setAttr['filename'] == $file) 57 | { 58 | foreach ($set as $translation) 59 | { 60 | self::$_translations[(string)$setName][(string)$translation->base] = $translation->local; 61 | } 62 | } 63 | } 64 | } 65 | 66 | return self::$_language; 67 | } 68 | 69 | public static function getDefaultLanguage() 70 | { 71 | self::getLanguages(); 72 | return self::$_defaultLanguage; 73 | } 74 | 75 | public static function translate($set, $text, $args = array(), $isHtml = false) 76 | { 77 | $defaultText = $text; 78 | 79 | $found = true; 80 | $direction = null; 81 | if (isset(self::$_translations[$set][$text])) 82 | { 83 | if (isset(self::$_translations[$set][$text]->attributes()->direction)) 84 | $direction = self::$_translations[$set][$text]->attributes()->direction; 85 | 86 | $text = self::$_translations[$set][$text]; 87 | } 88 | else if (isset(self::$_translations['default'][$text])) 89 | { 90 | if (isset(self::$_translations['default'][$text]->attributes()->direction)) 91 | $direction = self::$_translations['default'][$text]->attributes()->direction; 92 | 93 | $text = self::$_translations['default'][$text]; 94 | } 95 | else 96 | { 97 | self::$_untranslated[$defaultText] = $text; 98 | $found = false; 99 | } 100 | self::$_translated[$defaultText] = $text; 101 | 102 | if (count($args) > 0) 103 | { 104 | $text = vsprintf($text, $args); 105 | } 106 | 107 | if (!$isHtml) 108 | { 109 | $text = htmlspecialchars($text); 110 | } 111 | 112 | if (!$found && self::$_language != 'en') 113 | $text = '' . $text .''; 114 | 115 | if ($direction !== null) 116 | $text = ''. $text .''; 117 | 118 | return $text; 119 | } 120 | 121 | public static function makeBaseXml($untranslated = true) 122 | { 123 | $translations = $untranslated ? self::$_untranslated : self::$_translated; 124 | 125 | $xml = ''; 126 | foreach ($translations as $base => $local) 127 | { 128 | if (strpos($base, '<') !== false) 129 | $base = ''; 130 | else 131 | $base = htmlspecialchars($base); 132 | 133 | if (strpos($local, '<') !== false) 134 | $base = ''; 135 | else 136 | $base = htmlspecialchars($local); 137 | 138 | $xml .= ' ' ."\n"; 139 | $xml .= ' '. $base .'' ."\n"; 140 | $xml .= ' '. $local .'' ."\n"; 141 | $xml .= ' ' ."\n"; 142 | } 143 | 144 | return $xml; 145 | } 146 | } 147 | 148 | // Convenience functions 149 | 150 | function tl($text) 151 | { 152 | $args = func_get_args(); 153 | $args = array_slice($args, 1); 154 | return TranslateTool::translate('default', $text, $args, false); 155 | } 156 | 157 | function tlSet($set, $text) 158 | { 159 | $args = func_get_args(); 160 | $args = array_slice($args, 2); 161 | return TranslateTool::translate($set, $text, $args, false); 162 | } 163 | 164 | function tlHtml($text) 165 | { 166 | $args = func_get_args(); 167 | $args = array_slice($args, 1); 168 | return TranslateTool::translate('default', $text, $args, true); 169 | } 170 | -------------------------------------------------------------------------------- /code/_template/_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Game Name 5 | 1 May, 2012 6 | http://www.gamesite.com/ 7 | TRUE 8 | 9 | 10 | 11 | PC / Mac 12 | http://www.gamesite.com/ 13 | 14 | 15 | Steam 16 | http://www.steampowered.com/ 17 | 18 | 19 | Apple App Store 20 | http://www.itunes.com/ 21 | 22 | 23 | 24 | 25 | 26 | USD 27 | $1.99 28 | 29 | 30 | EUR 31 | €1.59 32 | 33 | 34 | CAD 35 | $1.99 36 | 37 | 38 | GBP 39 | £1.29 40 | 41 | 42 | 43 | 44 | Hello. This is a short compilation of facts about the game. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 45 | 46 | 47 | 48 | Since we're an indie developer, we want a history to our game. This paragraph will explain this history in short. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 49 | 50 | 51 | 52 | Includes something really interesting about the game which players will love. 53 | This feature line is about the 8-bit pixels that are no doubt featuring in this game. 54 | Since it is unlikely that the audio isn't fucking amazing, say something about the audio, maybe? 55 | Make sure to stress that everything about this game is absolutely fabulous. 56 | Something to wrap up this 5-point feature list with a nice ring to it. 57 | 58 | 59 | 60 | 61 | Trailer 62 | yqWX86uT5jM 63 | 110527266 64 | 65 | 66 | Gameplay Video 67 | yqWX86uT5jM 68 | 110527266 69 | 70 | 71 | 72 | 73 | 74 | Winner in this highly relevant contest. 75 | Award Location, 20 October, 1989 76 | 77 | 78 | Nomination for this prestigious award. 79 | Award Ceremony, 4 December, 1991 80 | 81 | 82 | Winner in this highly relevant contest. 83 | Award Location, 20 October, 1989 84 | 85 | 86 | Nomination for this prestigious award. 87 | Award Ceremony, 4 December, 1991 88 | 89 | 90 | 91 | 92 | 93 | This is a rather insignificant quote by a highly important person. 94 | Person Name 95 | Website 96 | http:// 97 | 98 | 99 | An extremely positive quote from a rather insignificant person. Also great. 100 | Some Guy 101 | This Page Is Visited By 12 Visitors A Month 102 | http:// 103 | 104 | 105 | I pretend to love this game even though I do not actually understand it. 106 | Pretentious Bastard 107 | Artsy Page 108 | http:// 109 | 110 | 111 | HOLY SHIT SO AMAZING 112 | Caps Guy 113 | Angry Review 114 | http:// 115 | 116 | 117 | 118 | 119 | 120 | Original Soundtrack 121 | Available for free from 122 | http://somemusicsite.com/thislink 123 | 124 | 125 | Release Blog Post 126 | The blog-post through which this game was released is available at 127 | http://vlambeer.com/bloglink 128 | 129 | 130 | 131 | 132 | 133 | Rami Ismail 134 | Business & Development, Vlambeer 135 | 136 | 137 | Jan Willem Nijman 138 | Game Designer, Vlambeer 139 | 140 | 141 | John Doe 142 | Artist, Freelancer 143 | 144 | 145 | Oliver Twist 146 | www.olivertwist.com 147 | Artist, Freelancer 148 | 149 | 150 | Jane Doette 151 | www.olivertwist.com 152 | Music, Freelancer 153 | 154 | 155 | -------------------------------------------------------------------------------- /code/games/a_fake_game/data.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Game Name 5 | 1 May, 2012 6 | http://www.gamesite.com/ 7 | TRUE 8 | 9 | 10 | 11 | PC / Mac 12 | http://www.gamesite.com/ 13 | 14 | 15 | Steam 16 | http://www.steampowered.com/ 17 | 18 | 19 | Apple App Store 20 | http://www.itunes.com/ 21 | 22 | 23 | 24 | 25 | 26 | USD 27 | $1.99 28 | 29 | 30 | EUR 31 | €1.59 32 | 33 | 34 | CAD 35 | $1.99 36 | 37 | 38 | GBP 39 | £1.29 40 | 41 | 42 | 43 | 44 | Hello. This is a short compilation of facts about the game. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 45 | 46 | 47 | 48 | Since we're an indie developer, we want a history to our game. This paragraph will explain this history in short. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 49 | 50 | 51 | 52 | Includes something really interesting about the game which players will love. 53 | This feature line is about the 8-bit pixels that are no doubt featuring in this game. 54 | Since it is unlikely that the audio isn't fucking amazing, say something about the audio, maybe? 55 | Make sure to stress that everything about this game is absolutely fabulous. 56 | Something to wrap up this 5-point feature list with a nice ring to it. 57 | 58 | 59 | 60 | 61 | Trailer 62 | yqWX86uT5jM 63 | 110527266 64 | 65 | 66 | Gameplay Video 67 | yqWX86uT5jM 68 | 110527266 69 | 70 | 71 | 72 | 73 | 74 | Winner in this highly relevant contest. 75 | Award Location, 20 October, 1989 76 | 77 | 78 | Nomination for this prestigious award. 79 | Award Ceremony, 4 December, 1991 80 | 81 | 82 | Winner in this highly relevant contest. 83 | Award Location, 20 October, 1989 84 | 85 | 86 | Nomination for this prestigious award. 87 | Award Ceremony, 4 December, 1991 88 | 89 | 90 | 91 | 92 | 93 | This is a rather insignificant quote by a highly important person. 94 | Person Name 95 | Website 96 | http://example.org 97 | 98 | 99 | An extremely positive quote from a rather insignificant person. Also great. 100 | Some Guy 101 | This Page Is Visited By 12 Visitors A Month 102 | http://example.org 103 | 104 | 105 | I pretend to love this game even though I do not actually understand it. 106 | Pretentious Bastard 107 | Artsy Page 108 | http://example.org 109 | 110 | 111 | HOLY SHIT SO AMAZING 112 | Caps Guy 113 | Angry Review 114 | http://example.org 115 | 116 | 117 | 118 | 119 | 120 | Original Soundtrack 121 | Available for free from 122 | http://somemusicsite.com/thislink 123 | 124 | 125 | Release Blog Post 126 | The blog-post through which this game was released is available at 127 | http://vlambeer.com/bloglink 128 | 129 | 130 | 131 | 132 | 133 | Rami Ismail 134 | Business & Development, Vlambeer 135 | 136 | 137 | Jan Willem Nijman 138 | Game Designer, Vlambeer 139 | 140 | 141 | John Doe 142 | Artist, Freelancer 143 | 144 | 145 | Oliver Twist 146 | http://www.olivertwist.com 147 | Artist, Freelancer 148 | 149 | 150 | Jane Doette 151 | http://www.olivertwist.com 152 | Music, Freelancer 153 | 154 | 155 | -------------------------------------------------------------------------------- /install.php: -------------------------------------------------------------------------------- 1 | Server Environment Check Failed: PHP Safe Mode Enabled

Sadly, you or your host seem to have enabled PHP Safe Mode. PHP Safe Mode results in unexpected behaviour with user-installed scripts on your server and might cause presskit() to not function correctly. Please upgrade to PHP 5.4.0 or later or disable Safe Mode to continue.

If you cannot disable Safe Mode nor upgrade and are comfortable installing scripts, please download the manual installation package.

'); 41 | die(); 42 | } 43 | 44 | $upgrade = 0; 45 | 46 | $file_needed = 0; 47 | if( count( glob( "*.*" ) ) > 3 ) 48 | { 49 | if( file_exists('validation.js') ) 50 | { 51 | if( file_exists('data.xml') ) 52 | { 53 | $upgrade = 1; 54 | } 55 | 56 | if( file_exists('_data.xml') ) 57 | { 58 | rename('_data.xml', '_data.bak'); 59 | } 60 | } 61 | } 62 | 63 | // We'll first need to grab the CSS files. Otherwise, this'll look like crap. 64 | if( file_exists('style.css') ) 65 | { 66 | unlink('style.css'); 67 | } 68 | 69 | dl_r('style.css'); 70 | 71 | if( !file_exists('style.css') ) 72 | { 73 | dl_r('style.css', 'https://vlambeer.com/kit/presskit/'); 74 | } 75 | 76 | if ($upgrade == 0) 77 | { 78 | $title = 'Installation'; 79 | } else { 80 | $title = 'Upgrade'; 81 | } 82 | 83 | dl_r('archive.zip'); 84 | 85 | if( !file_exists('archive.zip') ) 86 | { 87 | dl_r('archive.zip', 'https://vlambeer.com/kit/presskit/'); 88 | } 89 | 90 | if( !class_exists("ZipArchive") ) 91 | { 92 | dl_r('pclzip.lib'); 93 | rename('pclzip.lib','pclzip.lib.php'); 94 | require_once('pclzip.lib.php'); 95 | $archive = new PclZip('archive.zip'); 96 | if ($archive->extract() == 0) 97 | { 98 | die("Error : ".$archive->errorInfo(true)); 99 | } 100 | unlink('pclzip.lib.php'); 101 | } 102 | else 103 | { 104 | $zip = new ZipArchive; 105 | $res = $zip->open('archive.zip'); 106 | if( $res === TRUE ) 107 | { 108 | $zip->extractTo('.'); 109 | $zip->close(); 110 | } 111 | } 112 | 113 | if( file_exists('_data.bak') ) 114 | { 115 | rename('_data.bak', '_data.xml'); 116 | } 117 | 118 | if( !is_dir('images') ) 119 | { 120 | $directoriesText = '
  • Creating folders...
  • '; 121 | mkdir('images'); 122 | } else { 123 | $directoriesText = ''; 124 | } 125 | 126 | if( !is_dir('trailers') ) 127 | { 128 | mkdir('trailers'); 129 | } 130 | 131 | unlink('archive.zip'); 132 | 133 | if( $upgrade == 0 ) 134 | { 135 | $doneText = '

    Now comes the fun part!

    136 |

    This was rather easy & painless, wasn\'t it? Well, this is where the automated part ends and where you come in. There\'s about thirty to sixty minutes of work left and said work includes some XML-editing and FTP. By all means take a break and think of what you want to say about your company. I\'ll be right here!

    137 | '; 138 | } 139 | else 140 | { 141 | if( file_exists('_data.xml') ) 142 | { 143 | unlink('_data.xml'); 144 | } 145 | 146 | $doneText = '

    That was all!

    147 |

    Your scripts have been updated! There are a few more things that you need to do before we continue. The next steps should only take a few seconds to complete & as you\'d probably want to minimize the time your press page is unavailable, it\'d be best if you do everything right away.

    148 | '; 149 | } 150 | 151 | echo ' 152 | 153 | 154 | 155 | 156 | 157 | ' . $title . ' 158 | 159 | 160 | 161 | 162 | 163 |
    164 |
    165 | 169 |
    170 |

    Progress

    171 |

    Don\'t worry, this should be over before you really notice anything has happened.

    172 |
      173 |
    • Downloading files...
    • 174 |
    • Installing files...
    • 175 | ' . $directoriesText . ' 176 |
    • Deleting residue and temporary files...
    • 177 |
    178 | ' . $doneText . ' 179 |
    180 |
    181 |
    182 | 183 | 203 | 204 | '; 205 | -------------------------------------------------------------------------------- /code/data.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Company Name 6 | September 1, 2010 7 | https://github.com/juanuys/presskittie 8 | Cityville, Metropolisland 9 | 10 | press-contact@company.com 11 | +00 (1) 22 33 44 55 66 12 |
    13 | Address Line 1 14 | Address Line 2 15 | Address Line 3 16 |
    17 | 18 | 19 | 20 | http://twitter.com/MyCompanyName 21 | http://twitter.com/MyCompanyName 22 | 23 | 24 | http://facebook.com/MyCompanyName 25 | http://facebook.com/MyCompanyName 26 | 27 | 28 | Skype 29 | callto:MySkypeName 30 | 31 | 32 | 33 | 34 | You're seeing a presskit as generated by presskittie(), powered by Rami's presskit(). 35 | 36 | 37 | 38 | 39 |
    Early history
    40 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel nisi dolor. Pellentesque vitae eros velit, quis venenatis orci. Phasellus elit urna, semper ut gravida et, porta non dui. Aliquam erat volutpat. Aenean porta volutpat imperdiet. Maecenas venenatis, tellus eget vehicula vulputate, augue erat elementum quam, tincidunt laoreet magna orci et mauris. Proin porttitor pharetra nisi, accumsan sollicitudin neque varius a. Aenean ut massa ipsum, id hendrerit lacus. Maecenas posuere egestas nunc at cursus. Etiam mollis libero vel eros pulvinar aliquam. Sed vitae turpis sed nibh venenatis dictum. Sed suscipit orci justo, at sagittis ante. Sed leo nisl, ultricies in fermentum id, aliquam id dolor. Ut laoreet, felis id posuere bibendum, arcu ipsum lacinia est, eu lobortis velit enim eget mi. In ullamcorper ullamcorper enim ut gravida. Vivamus rutrum lacus mollis risus malesuada iaculis. 41 |
    42 | 43 |
    After that
    44 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sem dui, volutpat eu adipiscing sed, rutrum aliquam lacus. Proin sollicitudin consequat dolor id dignissim. Aliquam sem turpis, sagittis lobortis viverra eget, varius vitae nunc. Proin ac lacus porttitor dui sollicitudin elementum. Nulla ut hendrerit est. Fusce vitae arcu erat, vel molestie est. Proin et placerat justo. Proin placerat arcu massa, eu blandit leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam eu lorem sed massa lobortis hendrerit vitae vel odio. Maecenas eget pulvinar tortor. Nunc vitae nisl ac odio bibendum luctus ac a leo. Suspendisse auctor elit et velit sagittis vehicula. Maecenas faucibus blandit rutrum. Duis et sem nibh. Vestibulum placerat elit et dui rhoncus accumsan. 45 |
    46 |
    47 | 48 | 49 | 50 | This video is nice 51 | yqWX86uT5jM 52 | 110527266 53 | 54 | 55 | This one too 56 | yqWX86uT5jM 57 | 110527266 58 | 59 | 60 | 61 | 62 | 63 | Winner in this highly relevant contest. 64 | Award Location, 20 October, 1989 65 | 66 | 67 | Nomination for this prestigious award. 68 | Award Ceremony, 4 December, 1991 69 | 70 | 71 | Winner in this highly relevant contest. 72 | Award Location, 20 October, 1989 73 | 74 | 75 | Nomination for this prestigious award. 76 | Award Ceremony, 4 December, 1991 77 | 78 | 79 | 80 | 81 | 82 | This is a rather insignificant quote by a highly important person. 83 | Person Name 84 | Website 85 | http://www.website.com/ 86 | 87 | 88 | An extremely positive quote from a rather insignificant person. Also great. 89 | Some Guy 90 | This Page Is Visited By 12 Visitors A Month 91 | http://geocities.blog.com/ 92 | 93 | 94 | I pretend to love this game even though I do not actually understand it. 95 | Pretentious Bastard 96 | Artsy Page 97 | http://art.tumblr.com/ 98 | 99 | 100 | HOLY SHIT SO AMAZING 101 | Caps Guy 102 | Angry Review 103 | http://thispage.net/angrytube 104 | 105 | 106 | 107 | TRUE 108 | monetize 112 | 113 | 114 | Company Link #1 115 | This link is a link that might be useful. You can check it out at 116 | http://somemusicsite.com/thislink 117 | 118 | 119 | 120 | 121 | 122 | John Doe 123 | Artist, Freelancer 124 | 125 | 126 | Oliver Twist 127 | http://www.olivertwist.com 128 | Artist, Freelancer 129 | 130 | 131 | Jane Doette 132 | http://www.olivertwist.com 133 | Music, Freelancer 134 | 135 | 136 | 137 | 138 | 139 | Inquiries 140 | rami@vlambeer.com 141 | 142 | 143 | Twitter 144 | http://twitter.com/MyCompanyName 145 | 146 | 147 | Facebook 148 | http://facebook.com/MyCompanyName 149 | 150 | 151 | Web 152 | http://MyCompanyWebsite.com 153 | 154 | 155 |
    -------------------------------------------------------------------------------- /code/lang/en-English.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Language: 7 | Language: 8 | 9 | 10 | Factsheet 11 | Factsheet 12 | 13 | 14 | Description 15 | Description 16 | 17 | 18 | History 19 | History 20 | 21 | 22 | Projects 23 | Projects 24 | 25 | 26 | Videos 27 | Videos 28 | 29 | 30 | Images 31 | Images 32 | 33 | 34 | Logo & Icon 35 | Logo & Icon 36 | 37 | 38 | Awards & Recognition 39 | Awards & Recognition 40 | 41 | 42 | Selected Articles 43 | Selected Articles 44 | 45 | 46 | Additional Links 47 | Additional Links 48 | 49 | 50 | Team 51 | Team 52 | 53 | 54 | Contact 55 | Contact 56 | 57 | 58 | Developer: 59 | Developer: 60 | 61 | 62 | Based in %s 63 | Based in %s 64 | 65 | 66 | Founding date: 67 | Founding date: 68 | 69 | 70 | Website: 71 | Website: 72 | 73 | 74 | Press / Business Contact: 75 | Press / Business contact: 76 | 77 | 78 | Social: 79 | Social: 80 | 81 | 82 | Releases: 83 | Releases: 84 | 85 | 86 | Address: 87 | Address: 88 | 89 | 90 | Phone: 91 | Phone: 92 | 93 | 94 | contact us for specific requests!]]> 95 | contact us for specific requests!]]> 96 | 97 | 98 | contact us!]]> 99 | contact us!]]> 100 | 101 | 102 | download logo files as .zip (%s) 103 | download logo files as .zip (%s) 104 | 105 | 106 | contact us for specific requests!]]> 107 | contact us for specific requests!]]> 108 | 109 | 110 | Team & Repeating Collaborators 111 | Team & Repeating Collaborator 112 | 113 | 114 | Contact 115 | Contact 116 | 117 | 118 | 119 | 120 | 121 | Request Press Copy 122 | Request Press Copy 123 | 124 | 125 | Monetization Permission 126 | Monetization Permission 127 | 128 | 129 | About %s 130 | About %s 131 | 132 | 133 | Release date: 134 | Release date: 135 | 136 | 137 | Platforms: 138 | Platforms: 139 | 140 | 141 | Regular Price: 142 | Regular Price: 143 | 144 | 145 | Features 146 | Features 147 | 148 | 149 | download all screenshots & photos as .zip (%s) 150 | download all screenshots & photos as .zip (%s) 151 | 152 | 153 | contact us for specific requests!]]> 154 | contact us for specific requests!]]> 155 | 156 | 157 | Please fill in your e-mail address below and we'll get back to you as soon as a press copy is available for you. 158 | Please fill in your e-mail address below and we'll get back to you as soon as a press copy is available for you. 159 | 160 | 161 | me@website.com 162 | me@website.com 163 | 164 | 165 | , writing for 166 | , writing for 167 | 168 | 169 | company name 170 | company naam 171 | 172 | 173 | would like to 174 | would like to 175 | 176 | 177 | request a press copy 178 | request a press copy 179 | 180 | 181 | sending us a quick email.]]> 182 | sending us a quick email.]]> 183 | 184 | 185 | follow up with any questions or requests you might have!]]> 186 | follow up with any questions or requests you might have!]]> 187 | 188 | 189 | one of the options listed here.]]> 190 | one of the options listed here.]]> 191 | 192 | 193 | one of the options listed here.]]> 194 | one of the options listed here.]]> 195 | 196 | 197 | one of the options listed here.]]> 198 | one of the options listed here.]]> 199 | 200 | 201 | Boilerplate 202 | Boilerplate 203 | 204 | 205 | More information 206 | More information 207 | 208 | 209 | here.]]> 210 | here.]]> 211 | 212 | 213 | %s does currently not allow for the contents of %s to be published through video broadcasting services. 214 | %s does currently not allow for the contents of %s to be published through video broadcasting services. 215 | 216 | 217 | %s does allow the contents of this game to be published through video broadcasting services only with direct written permission from %s. Check at the bottom of this page for contact information. 218 | %s does allow the contents of this game to be published through video broadcasting services only with direct written permission from %s. Check at the bottom of this page for contact information. 219 | 220 | 221 | %s allows for the contents of %s to be published through video broadcasting services for non-commercial purposes only. Monetization of any video created containing assets from %s is not allowed. 222 | %s allows for the contents of %s to be published through video broadcasting services for non-commercial purposes only. Monetization of any video created containing assets from %s is not allowed. 223 | 224 | 225 | %s allows for the contents of %s to be published through video broadcasting services for any commercial or non-commercial purposes. Monetization of videos created containing assets from %s is legally & explicitly allowed by %s. 226 | %s allows for the contents of %s to be published through video broadcasting services for any commercial or non-commercial purposes. Monetization of videos created containing assets from %s is legally & explicitly allowed by %s. 227 | 228 | 229 | %s.]]> 230 | %s.]]> 231 | 232 | 233 | %s Credits 234 | %s Credits 235 | 236 | 237 | press kit 238 | press kit 239 | 240 | 241 | -------------------------------------------------------------------------------- /code/create.php: -------------------------------------------------------------------------------- 1 | array( 9 | "data.xml" => array( 10 | "text" => "Edit the _data.xml file that was created in the folder containing install.php & update it with the correct information.", 11 | "done" => False 12 | ), 13 | "header.png" => array( 14 | "text" => "Upload header.png (1200 pixels wide, up to 240 pixels high) to the images directory.", 15 | "done" => False 16 | ), 17 | "images" => array( 18 | "text" => "Upload appropriate *.png files to the images directory. No further action is required to make the images show up.", 19 | "done" => False 20 | ) 21 | ), 22 | "optional" => array( 23 | "images.zip" => array( 24 | "text" => "(Optional) Archive all the images and upload the file as images.zip. No further action is required to make the download show up.", 25 | "done" => False 26 | ), 27 | "logo" => array( 28 | "text" => "(Optional) Upload logo.png or icon.png. No further action is required to make the images show up.", 29 | "done" => False 30 | ), 31 | "logo.zip" => array( 32 | "text" => "(Optional) Archive the logo, icon and variations on them and upload the file as logo.zip. No further action is required to make the download show up.", 33 | "done" => False 34 | ), 35 | "trailers" => array( 36 | "text" => "(Optional) Upload appropriate *.mov or *.mp4 files in the trailers directory. Update _data.xml accordingly for this step, the <mov> and <mp4> tags are needed in the trailer entry for these downloads to show up.", 37 | "done" => False 38 | ) 39 | ), 40 | "additional" => array( 41 | "analytics" => array( 42 | "text" => "(Optional) Enable Google Analytics to track traffic to your presskit() by adding <analytics>your property id</analytics> to your _data.xml file.", 43 | "done" => False 44 | ) 45 | ) 46 | ); 47 | 48 | $navTitle = ''; 49 | $header = ''; 50 | $contentText = ''; 51 | 52 | if( file_exists("images/header.png") ) 53 | { 54 | $header = ''; 55 | } 56 | 57 | if( $state == 'upgrade' ) 58 | { 59 | $navTitle = 'Upgrade'; 60 | 61 | if( file_exists('install.php') ) 62 | { 63 | $contentText = '

    Ready?

    64 |

    Almost done! Just complete this final step and you\'ll be done with the upgrade. I don\'t want to sound forward, but you should know you\'re a better person for keeping your scripts up to date!

    '; 65 | 66 | // Recreate the todo array for the "remove instal.php" notice 67 | unset($todo); 68 | $todo = array( 69 | "finish" => array( 70 | "install.php" => array( 71 | "text" => "Rename or remove install.php for security purposes.", 72 | "done" => False 73 | ) 74 | ) 75 | ); 76 | } else { 77 | // There are no tasks left to do so we'll empty the array 78 | unset($todo); 79 | $todo = array(); 80 | 81 | $contentText = '

    Congratulations, you are ready to show this page to the world!

    82 |

    This shouldn\'t have been all that painful, has it? Either way, all that is left now is for you to see the press page in all its glory is one click.

    83 |

    Just click take me there already to see check out your fully patched & upgraded system.

    84 |

    Don\'t forget that you can always rename the data.xml file back to _data.xml to return to the instructions page.

    '; 85 | } 86 | } else if( $state == 'installation' ) { 87 | $navTitle = 'Installation'; 88 | 89 | if( file_exists('data.xml') ) 90 | { 91 | $contentText = '

    Congratulations, you are ready to show this page to the world!

    92 |

    It took effort, time & persistence (and a few hours of dabbling around in Photoshop), but you can finally say that you are done! All that is left now is for you to see the press page in all its glory is one click.

    93 |

    Just click take me there already to see the fruits of your hard labor.

    Don\'t forget that you can always rename the data.xml file back to _data.xml to return to the instructions page.

    '; 94 | 95 | // There are no tasks left to do so we'll empty the array 96 | unset($todo); 97 | $todo = array(); 98 | } else if( !file_exists('install.php') ) { 99 | $contentText = '

    Before you go... this is how you create new projects.

    100 |

    When this is all over, you probably want to add a project or some. Take a look at the files in the _template folder to see how you create a project. To easily create a project, duplicate the _template folder and rename it to the projects name in lowercase, replacing any white spaces with underscores. Imagine you have a project called "Super Crate Box", it would reside in a folder called "super_crate_box".

    101 |

    Got it! Let\'s rock!

    102 |

    When done, rename the _data.xml file to data.xml (without the underscore) to finish the page creation. After you\'ve renamed the file, refresh this page.

    '; 103 | 104 | // There are no tasks left to do so we'll empty the array 105 | unset($todo); 106 | $todo = array(); 107 | } else { 108 | $contentText = '

    Why am I seeing this page?

    109 |

    The installation procedure is almost done, but you\'ll probably need another thirty to sixty minutes to fully complete installation. Don\'t worry - things aren\'t in much of a hurry, you can always close this tab now and return later.

    110 |

    If you are ready, you will need FTP & XML-editing capabilities. Please complete the following steps to finish the installation.

    '; 111 | 112 | if( file_exists('_data.xml') ) 113 | { 114 | $file = file('_data.xml', FILE_SKIP_EMPTY_LINES); 115 | foreach( $file as $line_num => $line ) 116 | { 117 | if( $line_num < 10 ) 118 | { 119 | $line = htmlspecialchars($line); 120 | // check for the correct line 121 | if( strpos($line, '</title>') > 0 ) 122 | { 123 | $start = strpos($line, '<title>') + 13; 124 | $title = substr($line, $start, strlen("Company Name") ); 125 | 126 | if( ucwords(str_replace("_", " ", $title) ) != "Company Name" ) 127 | { 128 | $todo['required']['data.xml']['done'] = True; 129 | break; 130 | } 131 | } 132 | } 133 | } 134 | } 135 | 136 | if( file_exists('images/header.png') ) 137 | { 138 | $todo['required']['header.png']['done'] = True; 139 | } 140 | 141 | if( $files = glob("images/*.png") ) 142 | { 143 | if( count($files) > 0 ) 144 | { 145 | $found = 0; 146 | foreach( $files as $file ) 147 | { 148 | if( substr($file, -10) != "header.png" && substr($file, -8) != "logo.png" && substr($file, -8) != "icon.png" ) 149 | { 150 | $found++; 151 | } 152 | } 153 | 154 | if( $found > 0 ) 155 | { 156 | $todo['required']['images']['done'] = True; 157 | } 158 | } 159 | } 160 | 161 | if( file_exists('images/images.zip') ) 162 | { 163 | $todo['optional']['images.zip']['done'] = True; 164 | } 165 | 166 | if( file_exists('images/logo.png') || file_exists('images/icon.png') ) 167 | { 168 | $todo['optional']['logo']['done'] = True; 169 | } 170 | 171 | if( file_exists('images/logo.zip') ) 172 | { 173 | $todo['optional']['logo.zip']['done'] = True; 174 | } 175 | 176 | if( count(glob("trailers/*.mov")) + count(glob("trailers/*.mp4")) > 0 ) 177 | { 178 | $todo['optional']['trailers']['done'] = True; 179 | } 180 | 181 | if( file_exists('_data.xml') ) 182 | { 183 | $file = file('_data.xml', FILE_SKIP_EMPTY_LINES); 184 | $found = 0; 185 | foreach( $file as $line_num => $line ) 186 | { 187 | $line = htmlspecialchars($line); 188 | // check for the correct line 189 | if( strpos($line, '</analytics>') > 0 ) 190 | { 191 | $start = strpos($line, '<analytics>') + 17; 192 | $end = strpos($line, '</analytics>'); 193 | $analytics = substr($line, $start, $end - $start ); 194 | 195 | if( strlen($analytics) > 10 ) 196 | { 197 | echo('
  • '); 198 | $found++; 199 | break; 200 | } 201 | } 202 | } 203 | 204 | if( $found == 0 ) 205 | { 206 | $todo['additional']['analytics']['done'] = True; 207 | } 208 | } 209 | 210 | if ( $todo['required']['data.xml']['done'] === True && $todo['required']['header.png']['done'] === True && $todo['required']['images']['done'] === True) 211 | { 212 | $contentText = '

    Ready?

    213 |

    Almost done! Just complete this final step and you\'ll be done with all of this. You definitely deserve a nice drink after going through all of this.

    '; 214 | 215 | $todo['finish'] = array( 216 | 'install.php' => array( 217 | 'text' => 'Rename or remove install.php for security purposes.', 218 | 'done' => False 219 | ) 220 | ); 221 | } 222 | } 223 | } else { 224 | if( file_exists($game.'/data.xml') ) 225 | { 226 | unset($todo['additional']['analytics']); 227 | $todo['additional']['promoter'] = array( 228 | "text" => "(Optional) Enable Promoter to automatically list selected awards & reviews by checking the appropriate checkbox in the Promoter settings for your game.", 229 | "done" => False 230 | ); 231 | 232 | $navTitle = ucwords(str_replace("_", " ", $game)); 233 | 234 | $contentText = '

    Congratulations, you are ready to show this page to the world!

    235 |

    It took effort, time & persistence (and a few hours of dabbling around in Photoshop), but you can finally say that you are done! All that is left now is for you to refresh this page to see the '.ucwords(str_replace("_", " ", $game) ).' page in all its glory.

    236 | Don\'t forget that you can always rename the data.xml file back to _data.xml to return to the instructions page.

    '; 237 | 238 | // There are no tasks left to do so we'll empty the array 239 | unset($todo); 240 | $todo = array(); 241 | } else { 242 | $contentText = '

    Why am I seeing this page?

    243 |

    This game has an entry, but the relevant files have not been uploaded yet.

    244 |

    If you are the webmaster, please note that the appropriate files & directories have been generated for you. Take the following steps to create the press page:

    '; 245 | 246 | if( file_exists('_data.xml') ) 247 | { 248 | $file = file($game.'/_data.xml', FILE_SKIP_EMPTY_LINES); 249 | foreach( $file as $line_num => $line ) 250 | { 251 | $line = htmlspecialchars($line); 252 | // check for the correct line 253 | if( strpos($line, '</title>') > 0 ) 254 | { 255 | $start = strpos($line, '<title>') + 13; 256 | $title = substr($line, $start, strlen(ucwords(str_replace("_", " ", $game) ) ) ); 257 | 258 | if( ucwords(str_replace("_", " ", $title) ) == ucwords(str_replace("_", " ", $game) ) ) 259 | { 260 | $todo['required']['data.xml']['done'] = True; 261 | break; 262 | } 263 | } 264 | } 265 | } 266 | 267 | if( file_exists('images/header.png') ) 268 | { 269 | $todo['required']['header.png']['done'] = True; 270 | } 271 | 272 | if( $files = glob("images/*.png") ) 273 | { 274 | if( count($files) > 0 ) 275 | { 276 | $found = 0; 277 | foreach( $files as $file ) 278 | { 279 | if( substr($file, -10) != "header.png" && substr($file, -8) != "logo.png" && substr($file, -8) != "icon.png" ) 280 | { 281 | $found++; 282 | } 283 | } 284 | 285 | if( $found > 0 ) 286 | { 287 | $todo['required']['images']['done'] = True; 288 | } 289 | } 290 | } 291 | 292 | if( file_exists('images/images.zip') ) 293 | { 294 | $todo['optional']['images.zip']['done'] = True; 295 | } 296 | 297 | if( file_exists('images/logo.png') || file_exists('images/icon.png') ) 298 | { 299 | $todo['optional']['logo']['done'] = True; 300 | } 301 | 302 | if( file_exists('images/logo.zip') ) 303 | { 304 | $todo['optional']['logo.zip']['done'] = True; 305 | } 306 | 307 | if( count(glob("trailers/*.mov")) + count(glob("trailers/*.mp4")) > 0 ) 308 | { 309 | $todo['optional']['trailers']['done'] = True; 310 | } 311 | 312 | if( file_exists($game.'/_data.xml') ) 313 | { 314 | $file = file($game.'/_data.xml', FILE_SKIP_EMPTY_LINES); 315 | $found = 0; 316 | foreach( $file as $line_num => $line ) 317 | { 318 | $line = htmlspecialchars($line); 319 | // check for the correct line 320 | if( strpos($line, '</product>') > 0 ) 321 | { 322 | $start = strpos($line, '<product>') + 15; 323 | $end = strpos($line, '</product>'); 324 | $promoter = substr($line, $start, $end ); 325 | 326 | if( $promoter != 0 ) 327 | { 328 | $todo['optional']['promoter']['done'] = True; 329 | break; 330 | } 331 | } 332 | } 333 | } 334 | 335 | if( file_exists($game.'/images/data.xml') ) 336 | { 337 | $contentText = '

    Ready!

    338 |

    You are done. Refresh this page to see the result.

    '; 339 | } else if ( $todo['required']['data.xml']['done'] === True && $todo['required']['header.png']['done'] === True && $todo['required']['images']['done'] === True) 340 | { 341 | $contentText = '

    Ready?

    342 |

    When done, rename the _data.xml file to data.xml (without the underscore) to finish the page creation. After you\'ve renamed the file, refresh this page.

    '; 343 | 344 | $todo['finish'] = array( 345 | 'install.php' => array( 346 | 'text' => 'Rename or remove install.php for security purposes.', 347 | 'done' => False 348 | ) 349 | ); 350 | } 351 | } 352 | } 353 | 354 | echo ' 358 |
    '; 359 | echo $header; 360 | echo $contentText; 361 | 362 | if ( isset($todo['finish']) ) 363 | { 364 | echo '

    Finish the installation

    365 |
      '; 366 | foreach ($todo['finish'] as $item) 367 | { 368 | if ($item['done'] === True) 369 | { 370 | echo '
    • '; 371 | } else { 372 | echo '
    • '; 373 | } 374 | 375 | echo $item['text']; 376 | echo '
    • '; 377 | } 378 | echo '
    '; 379 | } 380 | 381 | if ( isset($todo['required']) ) 382 | { 383 | echo '

    Required actions

    384 |
      '; 385 | foreach ($todo['required'] as $item) 386 | { 387 | if ($item['done'] === True) 388 | { 389 | echo '
    • '; 390 | } else { 391 | echo '
    • '; 392 | } 393 | 394 | echo $item['text']; 395 | echo '
    • '; 396 | } 397 | echo '
    '; 398 | } 399 | 400 | if ( isset($todo['optional']) ) 401 | { 402 | echo '

    Optional actions

    403 |
      '; 404 | foreach ($todo['optional'] as $item) 405 | { 406 | if ($item['done'] === True) 407 | { 408 | echo '
    • '; 409 | } else { 410 | echo '
    • '; 411 | } 412 | 413 | echo $item['text']; 414 | echo '
    • '; 415 | } 416 | echo '
    '; 417 | } 418 | 419 | if ( isset($todo['additional']) ) 420 | { 421 | echo '

    Additional services

    422 |
      '; 423 | foreach ($todo['additional'] as $item) 424 | { 425 | if ($item['done'] === True) 426 | { 427 | echo '
    • '; 428 | } else { 429 | echo '
    • '; 430 | } 431 | 432 | echo $item['text']; 433 | echo '
    • '; 434 | } 435 | echo '
    '; 436 | } 437 | 438 | echo '
    '; 439 | 440 | ?> 441 | -------------------------------------------------------------------------------- /code/index.php: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | 32 | 33 | 34 | Instructions 35 | 36 | 37 | 38 | 39 | 40 |
    41 |
    42 |
    43 |
    44 | 45 | 46 | '; 47 | exit; 48 | } 49 | } 50 | 51 | // Language logic 52 | 53 | include 'lang/TranslateTool.php'; 54 | $language = TranslateTool::loadLanguage(isset($_GET['l']) ? $_GET['l'] : null, 'index.php'); 55 | $languageQuery = ($language != TranslateTool::getDefaultLanguage() ? '?l='. $language : ''); 56 | 57 | if (file_exists('data-'. $language .'.xml')) 58 | $xml = simplexml_load_file('data-'. $language .'.xml'); 59 | else 60 | $xml = simplexml_load_file('data.xml'); 61 | 62 | foreach( $xml->children() as $child ) 63 | { 64 | switch( $child->getName() ) 65 | { 66 | case("title"): 67 | define("COMPANY_TITLE", $child); 68 | break; 69 | case("founding-date"): 70 | define("COMPANY_DATE", $child); 71 | break; 72 | case("website"): 73 | define("COMPANY_WEBSITE", $child); 74 | break; 75 | case("press-contact"): 76 | define("COMPANY_CONTACT", $child); 77 | break; 78 | case("based-in"): 79 | define("COMPANY_BASED", $child); 80 | break; 81 | case("analytics"): 82 | define("ANALYTICS", $child); 83 | break; 84 | case("socials"): 85 | $socials = array(); 86 | $i = 0; 87 | foreach( $child->children() as $subchild ) 88 | { 89 | $socials[$i][$subchild->getName()] = $subchild; 90 | $i++; 91 | } 92 | break; 93 | case("address"): 94 | $address = array(); 95 | $i = 0; 96 | foreach( $child->children() as $subchild ) 97 | { 98 | $address[$i] = $subchild; 99 | $i++; 100 | } 101 | break; 102 | case("phone"): 103 | define("COMPANY_PHONE", $child); 104 | break; 105 | case("description"): 106 | define("COMPANY_DESCRIPTION", $child); 107 | break; 108 | case("histories"): 109 | $histories = array(); 110 | $i = 0; 111 | foreach( $child->children() as $subchild ) 112 | { 113 | $histories[$i][$subchild->getName()] = $subchild; 114 | $i++; 115 | } 116 | break; 117 | case("features"): 118 | $features = array(); 119 | $i = 0; 120 | foreach( $child->children() as $subchild ) 121 | { 122 | $features[$i] = $subchild; 123 | $i++; 124 | } 125 | break; 126 | case("trailers"): 127 | $trailers = array(); 128 | $i = 0; 129 | foreach( $child->children() as $subchild ) 130 | { 131 | $trailers[$i][$subchild->getName()] = $subchild; 132 | $i++; 133 | } 134 | break; 135 | case("awards"): 136 | $awards = array(); 137 | $i = 0; 138 | foreach( $child->children() as $subchild ) 139 | { 140 | $awards[$i][$subchild->getName()] = $subchild; 141 | $i++; 142 | } 143 | break; 144 | case("quotes"): 145 | $quotes = array(); 146 | $i = 0; 147 | foreach( $child->children() as $subchild ) 148 | { 149 | $quotes[$i][$subchild->getName()] = $subchild; 150 | $i++; 151 | } 152 | break; 153 | case("additionals"): 154 | $additionals = array(); 155 | $i = 0; 156 | foreach( $child->children() as $subchild ) 157 | { 158 | $additionals[$i][$subchild->getName()] = $subchild; 159 | $i++; 160 | } 161 | break; 162 | case("credits"): 163 | $credits = array(); 164 | $i = 0; 165 | foreach( $child->children() as $subchild ) 166 | { 167 | $credits[$i][$subchild->getName()] = $subchild; 168 | $i++; 169 | } 170 | break; 171 | case("contacts"): 172 | $contacts = array(); 173 | $i = 0; 174 | foreach( $child->children() as $subchild ) 175 | { 176 | $contacts[$i][$subchild->getName()] = $subchild; 177 | $i++; 178 | } 179 | break; 180 | } 181 | } 182 | 183 | function parseLink($uri) 184 | { 185 | $parsed = trim($uri); 186 | if( strpos($parsed, "http://") === 0 ) 187 | $parsed = substr($parsed, 7); 188 | if (strpos($parsed, "https://") === 0 ) 189 | $parsed = substr($parsed, 8); 190 | if( strpos($parsed, "www.") === 0 ) 191 | $parsed = substr($parsed, 4); 192 | if( strrpos($parsed, "/") == strlen($parsed) - 1) 193 | $parsed = substr($parsed, 0, strlen($parsed) - 1); 194 | if( substr($parsed,-1,1) == "/" ) 195 | $parsed = substr($parsed, 0, strlen($parsed) - 1); 196 | 197 | return $parsed; 198 | } 199 | 200 | echo ' 201 | 202 | 203 | 204 | 205 | 206 | '. COMPANY_TITLE .' 207 | 208 | 209 | 210 | 211 | 212 |
    213 |
    214 | 247 |
    '; 248 | 249 | if( file_exists("images/header.png") ) { 250 | echo ''; 251 | } 252 | 253 | echo '
    254 |
    255 |

    '. tl('Factsheet') .'

    256 |

    257 | '. tl('Developer:') .'
    258 | '. COMPANY_TITLE .'
    259 | '. tl('Based in %s', COMPANY_BASED) .' 260 |

    261 |

    262 | '. tl('Founding date:') .'
    263 | '. COMPANY_DATE .' 264 |

    265 |

    266 | '. tl('Website:') .'
    267 | '. parseLink(COMPANY_WEBSITE) .' 268 |

    269 |

    270 | '. tl('Press / Business Contact:') .'
    271 | '. COMPANY_CONTACT .' 272 |

    273 |

    274 | '. tl('Social:') .'
    '; 275 | 276 | for( $i = 0; $i < count($socials); $i++ ) 277 | { 278 | $name = $link = ""; 279 | 280 | foreach( $socials[$i]['social']->children() as $child ) 281 | { 282 | if( $child->getName() == "name" ) $name = $child; 283 | else if( $child->getName() == "link" ) $link = $child; 284 | } 285 | echo( ''.$name.'
    ' ); 286 | } 287 | 288 | echo '

    289 |

    290 | '. tl('Releases:') .'
    '; 291 | 292 | if ($handle = opendir('.')) { 293 | while (false !== ($entry = readdir($handle))) { 294 | if ($entry != "." && $entry != ".." && $entry != "lang" && substr($entry,0,1) != "_" && strpos($entry, ".") === FALSE && substr($entry,-4) != ".log" && substr($entry,0,6) != "images" && substr($entry,0,8) != "trailers" && substr($entry,0,9) != "error_log") { 295 | echo ''.ucwords(str_replace("_", " ", $entry)).'
    '; 296 | } 297 | } 298 | } 299 | closedir($handle); 300 | 301 | echo '

    302 |

    '; 303 | 304 | if( count($address) > 0 ) 305 | { 306 | echo ''. tl('Address:') .'
    '; 307 | for( $i = 0; $i < count($address); $i++ ) 308 | { 309 | echo $address[$i].'
    '; 310 | } 311 | } 312 | 313 | echo'

    314 |

    315 | '. tl('Phone:') .'
    316 | '. COMPANY_PHONE .' 317 |

    318 |
    319 |
    320 |

    '. tl('Description') .'

    321 |

    '. COMPANY_DESCRIPTION .'

    322 |

    '. tl('History') .'

    '; 323 | 324 | for( $i = 0; $i < count($histories); $i++ ) 325 | { 326 | $header = $text =""; 327 | 328 | foreach( $histories[$i]['history']->children() as $child ) 329 | { 330 | if( $child->getName() == "header" ) $header = $child; 331 | else if( $child->getName() == "text" ) $text = $child; 332 | } 333 | echo ''.$header.' 334 |

    '.$text.'

    '; 335 | } 336 | 337 | echo '

    '. tl('Projects') .'

    338 |
      '; 339 | 340 | if ($handle = opendir($games_location)) { 341 | while (false !== ($entry = readdir($handle))) { 342 | if ($entry != "." && $entry != ".." && $entry != "lang" && substr($entry,0,1) != "_" && strpos($entry, ".") === FALSE && substr($entry,-4) != ".log" && substr($entry,0,6) != "images" && substr($entry,0,8) != "trailers" && substr($entry,0,9) != "error_log") { 343 | echo '
    • '.ucwords(str_replace("_", " ", $entry)).'
    • '; 344 | } 345 | } 346 | } 347 | closedir($handle); 348 | 349 | echo '
    350 |
    351 |
    352 | 353 |
    354 | 355 |

    '. tl('Videos') .'

    '; 356 | 357 | if( count($trailers) == 0 ) 358 | { 359 | echo '

    '. tlHtml('There are currently no trailers available for %s. Check back later for more or contact us for specific requests!', COMPANY_TITLE) .'

    '; 360 | } 361 | else 362 | { 363 | for( $i = 0; $i < count($trailers); $i++ ) 364 | { 365 | $name = $youtube = $vimeo = $mov = $mp4 = ""; 366 | $ytfirst = -1; 367 | 368 | foreach( $trailers[$i]['trailer']->children() as $child ) 369 | { 370 | if( $child->getName() == "name" ) { 371 | $name = $child; 372 | } else if( $child->getName() == "youtube" ) { 373 | $youtube = $child; 374 | 375 | if( $ytfirst == -1 ) { 376 | $ytfirst = 1; 377 | } 378 | } else if( $child->getName() == "vimeo" ) { 379 | $vimeo = $child; if( $ytfirst == -1 ) { 380 | $ytfirst = 0; 381 | } 382 | } else if( $child->getName() == "mov" ) { 383 | $mov = $child; 384 | } else if( $child->getName() == "mp4" ) { 385 | $mp4 = $child; 386 | } 387 | } 388 | 389 | if( strlen($youtube) + strlen($vimeo) > 0 ) 390 | { 391 | echo '

    '.$name.' '; 392 | $result = ""; 393 | 394 | if( strlen( $youtube ) > 0 ) { 395 | $result .= 'YouTube, '; 396 | } 397 | if( strlen( $vimeo ) > 0 ) { 398 | $result .= 'Vimeo, '; 399 | } 400 | if( strlen( $mov ) > 0 ) { 401 | $result .= '.mov, '; 402 | } 403 | if( strlen( $mp4 ) > 0 ) { 404 | $result .= '.mp4, '; 405 | } 406 | 407 | echo substr($result, 0, -2); 408 | 409 | if( $ytfirst == 1 ) 410 | { 411 | echo '

    412 | 413 |
    '; 414 | } elseif ( $ytfirst == 0 ) { 415 | echo '
    416 | 417 |
    '; 418 | } 419 | echo '

    '; 420 | } 421 | } 422 | } 423 | 424 | echo '
    425 | 426 |

    '. tl('Images') .'

    '; 427 | 428 | if( file_exists("images/images.zip") ) 429 | { 430 | $filesize = filesize("images/images.zip"); 431 | if( $filesize > 1024 && $filesize < 1048576 ) { 432 | $filesize = (int)( $filesize / 1024 ).'KB'; 433 | } 434 | if( $filesize > 1048576 ) { 435 | $filesize = (int)(( $filesize / 1024 ) / 1024 ).'MB'; 436 | } 437 | 438 | echo '
    '. tl('download all screenshots & photos as .zip (%s)', $filesize) .'
    '; 439 | } 440 | 441 | echo '
    '; 442 | if ($handle = opendir('images')) 443 | { 444 | /* This is the correct way to loop over the directory. */ 445 | while (false !== ($entry = readdir($handle))) 446 | { 447 | if( substr($entry,-4) == ".png" || substr($entry,-4) == ".gif" ) 448 | { 449 | if( substr($entry,0,4) != "logo" && substr($entry,0,4) != "icon" && substr($entry,0,6) != "header" ) 450 | { 451 | echo '
    '.$entry.'
    '; 452 | } 453 | } 454 | } 455 | } 456 | echo '
    '; 457 | 458 | closedir($handle); 459 | 460 | echo '

    '. tlHtml('There are far more images available for %s, but these are the ones we felt would be most useful to you. If you have specific requests, please do contact us!', COMPANY_TITLE) .'

    461 | 462 |
    463 | 464 | '; 465 | 466 | if( file_exists("images/logo.zip") ) 467 | { 468 | $filesize = filesize("images/logo.zip"); 469 | if( $filesize > 1024 && $filesize < 1048576 ) { 470 | $filesize = (int)( $filesize / 1024 ).'KB'; 471 | } 472 | if( $filesize > 1048576 ) { 473 | $filesize = (int)(( $filesize / 1024 ) / 1024 ).'MB'; 474 | } 475 | 476 | echo '
    '. tl('download logo files as .zip (%s)', $filesize) .'
    '; 477 | } 478 | 479 | echo '
    '; 480 | 481 | if( file_exists('images/logo.png') ) { 482 | echo '
    logo
    '; 483 | } 484 | 485 | if( file_exists('images/icon.png') ) { 486 | echo '
    logo
    '; 487 | } 488 | 489 | echo '
    '; 490 | 491 | if( !file_exists('images/logo.png') && !file_exists('images/icon.png')) { 492 | echo '

    '. tlHtml('There are currently no logos or icons available for %s. Check back later for more or contact us for specific requests!', COMPANY_TITLE) .'

    '; 493 | } 494 | 495 | echo '
    '; 496 | 497 | if( count( $awards > 0 ) ) 498 | { 499 | echo('

    '. tl('Awards & Recognition') .'

    500 |
      '); 501 | 502 | for( $i = 0; $i < count($awards); $i++ ) 503 | { 504 | $description = $info = ""; 505 | 506 | foreach( $awards[$i]['award']->children() as $child ) 507 | { 508 | if( $child->getName() == "description" ) { 509 | $description = $child; 510 | } else if( $child->getName() == "info" ) { 511 | $info = $child; 512 | } 513 | } 514 | 515 | echo '
    • "'.$description.'" - '.$info.'
    • '; 516 | } 517 | 518 | echo('

    '); 519 | } 520 | 521 | if( count($quotes) > 0 ) 522 | { 523 | echo '

    '. tl('Selected Articles') .'

    524 |
      '; 525 | 526 | for( $i = 0; $i < count($quotes); $i++ ) 527 | { 528 | $description = $name = $website = $link = ""; 529 | 530 | foreach( $quotes[$i]['quote']->children() as $child ) 531 | { 532 | if( $child->getName() == "description" ) { 533 | $description = $child; 534 | } else if( $child->getName() == "name" ) { 535 | $name = $child; 536 | } else if( $child->getName() == "website" ) { 537 | $website = $child; 538 | } else if( $child->getName() == "link" ) { 539 | $link = $child; 540 | } 541 | } 542 | 543 | echo '
    • "'.$description.'"
      - '.$name.', '.$website.'
    • '; 544 | } 545 | 546 | echo '

    '; 547 | } 548 | 549 | if( count($additionals) > 0 ) { 550 | echo ''; 551 | 552 | for( $i = 0; $i < count($additionals); $i++ ) 553 | { 554 | $title = $description = $link = ""; 555 | 556 | foreach( $additionals[$i]['additional']->children() as $child ) 557 | { 558 | if( $child->getName() == "title" ) { 559 | $title = $child; 560 | } else if( $child->getName() == "description" ) { 561 | $description = $child; 562 | } else if( $child->getName() == "link" ) { 563 | $link = $child; 564 | } 565 | } 566 | 567 | if( strpos(parseLink($link),'/') !== false ) { 568 | $linkTitle = substr(parseLink($link),0,strpos(parseLink($link),'/')); 569 | } else { $linkTitle = $link; } 570 | 571 | echo '

    572 | '.$title.'
    573 | '.$description.' '.$linkTitle.'. 574 |

    '; 575 | 576 | } 577 | 578 | echo '
    '; 579 | } 580 | 581 | echo '
    582 |
    583 |

    '. tl('Team & Repeating Collaborators') .'

    '; 584 | 585 | for( $i = 0; $i < count($credits); $i++ ) 586 | { 587 | $previous = $website = $person = $role = ""; 588 | foreach( $credits[$i]['credit']->children() as $child ) 589 | { 590 | if( $child->getName() == "person" ) { 591 | $person = $child; 592 | } else if( $child->getName() == "previous" ) { 593 | $previous = $child; 594 | } else if( $child->getName() == "website" ) { 595 | $website = $child; 596 | } else if( $child->getName() == "role" ) { 597 | $role = $child; 598 | } 599 | } 600 | 601 | echo '

    '; 602 | 603 | if( strlen($website) == 0 ) 604 | { 605 | echo ''.$person.'
    '.$role; 606 | } 607 | else 608 | { 609 | echo ''.$person.'
    '.$role.''; 610 | } 611 | 612 | echo '

    '; 613 | } 614 | 615 | echo '
    616 |
    617 |

    '. tl('Contact') .'

    '; 618 | 619 | for( $i = 0; $i < count($contacts); $i++ ) 620 | { 621 | $link = $mail = $name = ""; 622 | foreach( $contacts[$i]['contact']->children() as $child ) 623 | { 624 | if( $child->getName() == "name" ) { 625 | $name = $child; 626 | } else if( $child->getName() == "link" ) { 627 | $link = $child; 628 | } else if( $child->getName() == "mail" ) { 629 | $mail = $child; 630 | } 631 | } 632 | 633 | echo '

    '; 634 | 635 | if( strlen($link) == 0 && strlen($mail) > 0 ) { 636 | echo ''.$name.'
    '.$mail.''; 637 | } 638 | if( strlen($link) > 0 && strlen($mail) == 0 ) { 639 | echo ''.$name.'
    '.parseLink($link).''; 640 | } 641 | 642 | echo '

    '; 643 | } 644 | 645 | echo '
    646 |
    647 | 648 |
    649 | 650 |

    presskit() by Rami Ismail (Vlambeer) - also thanks to these fine folks

    651 |
    652 |
    653 |
    654 | 655 | 656 | 657 | 658 | '; 669 | if ( defined("ANALYTICS") && strlen(ANALYTICS) > 10 ) 670 | { 671 | echo ''; 682 | } 683 | echo' 684 | '; 685 | 686 | -------------------------------------------------------------------------------- /code/sheet.php: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | 32 | 33 | Thanks! 34 | 35 | 36 | 37 | 38 | 39 |
    40 |
    41 |
    42 |
    43 | 44 | 49 | 50 | '; 51 | exit; 52 | } 53 | else if( is_dir($games_location.$game) && $game != "lang" && $game != "images" && $game != "trailers" && $game != "_template" ) 54 | { 55 | echo ' 56 | 57 | 58 | 59 | 60 | 61 | Instructions 62 | 63 | 64 | 65 | 66 | 67 |
    68 |
    69 |
    70 |
    71 | 72 | 73 | '; 74 | 75 | // Todo: These steps will fail if safemode is turned on 76 | if( !is_dir($games_location.$game.'/images') ) { 77 | mkdir($games_location.$game.'/images'); 78 | } 79 | if( !is_dir($games_location.$game.'/trailers') ) { 80 | mkdir($games_location.$game.'/trailers'); 81 | } 82 | if( !file_exists($games_location.$game.'/_data.xml') ) { 83 | copy('_template/_data.xml', $games_location.$game.'/_data.xml'); 84 | } 85 | 86 | exit; 87 | } 88 | else 89 | { 90 | header("Location: index.php"); 91 | exit; 92 | } 93 | } 94 | 95 | /* check for distribute() keyfile */ 96 | $files = glob($games_location.$game.'/ds_*'); 97 | foreach( $files as $keyfile ) { 98 | $keyfileContent = fopen($keyfile, 'r'); 99 | $presskitURL = fgets($keyfileContent); 100 | $url = fgets($keyfileContent); 101 | $key = substr($keyfile, strpos($keyfile,'/ds_') + 4); 102 | $data = array('key' => $key, 'url' => $url); 103 | fclose($keyfileContent); 104 | 105 | if( function_exists('curl_version') ) { 106 | // curl exists. this is good. let's use it. 107 | $ch = curl_init(); 108 | curl_setopt($ch, CURLOPT_URL, $url); 109 | curl_setopt($ch, CURLOPT_POST, 1); 110 | curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); 111 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 112 | 113 | $result = curl_exec($ch); 114 | if( $result != "FAIL" ) $press_request = TRUE; 115 | else { 116 | $press_request_fail = TRUE; 117 | $press_request_fail_msg = tl('There was an unexpected error retrieving data from distribute(). Please try again later.'); 118 | } 119 | 120 | curl_close($ch); 121 | } 122 | else if( ini_get('allow_url') ) { 123 | // well maybe this is a good fallback who knows? 124 | $options = array( 125 | 'http' => array( 126 | 'header' => 'Content-type: application/x-www-form-urlencoded', 127 | 'method' => 'POST', 128 | 'content' => http_build_query($data), 129 | ), 130 | ); 131 | 132 | $context = stream_context_create($options); 133 | $result = file_get_contents($url); 134 | if( $result != "FAIL" ) $press_request = TRUE; 135 | else { 136 | $press_request_fail = TRUE; 137 | $press_request_fail_msg = tl('There was an unforeseen error retrieving data from distribute(). Please try again later.'); 138 | } 139 | } else { 140 | // it doesn't matter you have a keyfile, you can't integrate 141 | $press_request = FALSE; 142 | $press_request_fail = TRUE; 143 | $press_request_fail_msg = tl('There is no method to communicate with distribute() available on your server. This functionality is not currently available. Remove the keyfile to remove this warning.'); 144 | } 145 | } 146 | 147 | // Set default value for monetize 148 | $monetize = 0; 149 | 150 | foreach( $xml->children() as $child ) 151 | { 152 | switch( $child->getName() ) 153 | { 154 | case("title"): 155 | define("GAME_TITLE", $child); 156 | break; 157 | case("release-date"): 158 | define("GAME_DATE", $child); 159 | break; 160 | case("website"): 161 | define("GAME_WEBSITE", $child); 162 | break; 163 | case("platforms"): 164 | $platforms = array(); 165 | $i = 0; 166 | foreach( $child->children() as $subchild ) 167 | { 168 | $platforms[$i][$subchild->getName()] = $subchild; 169 | $i++; 170 | } 171 | break; 172 | case("prices"): 173 | $prices = array(); 174 | $i = 0; 175 | foreach( $child->children() as $subchild ) 176 | { 177 | $prices[$i][$subchild->getName()] = $subchild; 178 | $i++; 179 | } 180 | break; 181 | case("description"): 182 | define("GAME_DESCRIPTION", $child); 183 | break; 184 | case("history"): 185 | define("GAME_HISTORY", $child); 186 | break; 187 | case("histories"): 188 | $histories = array(); 189 | $i = 0; 190 | foreach( $child->children() as $subchild ) 191 | { 192 | $histories[$i][$subchild->getName()] = $subchild; 193 | $i++; 194 | } 195 | break; 196 | case("features"): 197 | $features = array(); 198 | $i = 0; 199 | foreach( $child->children() as $subchild ) 200 | { 201 | $features[$i] = $subchild; 202 | $i++; 203 | } 204 | break; 205 | case("trailers"): 206 | $trailers = array(); 207 | $i = 0; 208 | foreach( $child->children() as $subchild ) 209 | { 210 | $trailers[$i][$subchild->getName()] = $subchild; 211 | $i++; 212 | } 213 | break; 214 | case("awards"): 215 | $awards = array(); 216 | $i = 0; 217 | foreach( $child->children() as $subchild ) 218 | { 219 | $awards[$i][$subchild->getName()] = $subchild; 220 | $i++; 221 | } 222 | break; 223 | case("quotes"): 224 | $quotes = array(); 225 | $i = 0; 226 | foreach( $child->children() as $subchild ) 227 | { 228 | $quotes[$i][$subchild->getName()] = $subchild; 229 | $i++; 230 | } 231 | break; 232 | case("press-can-request-copy"): 233 | if( strtolower($child) != "false" ) $press_request_outdated_warning = TRUE; 234 | break; 235 | case("monetization-permission"): 236 | if( strtolower($child) == "false" ) $monetize = 1; 237 | else if( strtolower($child) == "ask") $monetize = 2; 238 | else if( strtolower($child) == "non-commercial") $monetize = 3; 239 | else if( strtolower($child) == "monetize") $monetize = 4; 240 | break; 241 | case("additionals"): 242 | $additionals = array(); 243 | $i = 0; 244 | foreach( $child->children() as $subchild ) 245 | { 246 | $additionals[$i][$subchild->getName()] = $subchild; 247 | $i++; 248 | } 249 | break; 250 | case("credits"): 251 | $credits = array(); 252 | $i = 0; 253 | foreach( $child->children() as $subchild ) 254 | { 255 | $credits[$i][$subchild->getName()] = $subchild; 256 | $i++; 257 | } 258 | break; 259 | } 260 | } 261 | 262 | if (file_exists('data-'. $language .'.xml')) 263 | $xml = simplexml_load_file('data-'. $language .'.xml'); 264 | else 265 | $xml = simplexml_load_file('data.xml'); 266 | 267 | foreach( $xml->children() as $child ) 268 | { 269 | switch( $child->getName() ) 270 | { 271 | case("title"): 272 | define("COMPANY_TITLE", $child); 273 | break; 274 | case("based-in"): 275 | define("COMPANY_BASED", $child); 276 | break; 277 | case("description"): 278 | define("COMPANY_DESCRIPTION", $child); 279 | break; 280 | case("analytics"): 281 | define("ANALYTICS", $child); 282 | break; 283 | case("contacts"): 284 | $contacts = array(); 285 | $i = 0; 286 | foreach( $child->children() as $subchild ) 287 | { 288 | $contacts[$i][$subchild->getName()] = $subchild; 289 | $i++; 290 | } 291 | break; 292 | } 293 | } 294 | 295 | function parseLink($uri) 296 | { 297 | $parsed = trim($uri); 298 | if( strpos($parsed, "http://") === 0 ) 299 | $parsed = substr($parsed, 7); 300 | if (strpos($parsed, "https://") === 0 ) 301 | $parsed = substr($parsed, 8); 302 | if( strpos($parsed, "www.") === 0 ) 303 | $parsed = substr($parsed, 4); 304 | if( strrpos($parsed, "/") == strlen($parsed) - 1) 305 | $parsed = substr($parsed, 0, strlen($parsed) - 1); 306 | if( substr($parsed,-1,1) == "/" ) 307 | $parsed = substr($parsed, 0, strlen($parsed) - 1); 308 | 309 | return $parsed; 310 | } 311 | 312 | echo ' 313 | 314 | 315 | 316 | 317 | 318 | '. COMPANY_TITLE .' 319 | 320 | 321 | 322 | 323 | 324 |
    325 |
    326 | 358 |
    '; 359 | 360 | if( file_exists($games_location.$game."/images/header.png") ) { 361 | echo ''; 362 | } 363 | 364 | echo '
    365 |
    366 |

    '. tl('Factsheet'). '

    367 |

    368 | '. tl('Developer:'). '
    369 | '. COMPANY_TITLE .'
    370 | '. tl('Based in %s', COMPANY_BASED) .' 371 |

    372 |

    373 | '. tl('Release date:'). '
    374 | '. GAME_DATE .' 375 |

    376 | 377 |

    378 | '. tl('Platforms:'). '
    '; 379 | 380 | for( $i = 0; $i < count($platforms); $i++ ) 381 | { 382 | $name = $link = ""; 383 | foreach( $platforms[$i]['platform']->children() as $child ) 384 | { 385 | if( $child->getName() == "name" ) { 386 | $name = $child; 387 | } else if( $child->getName() == "link" ) { 388 | $link = $child; 389 | } 390 | } 391 | echo ''.$name.'
    '; 392 | } 393 | 394 | echo '

    395 |

    396 | '. tl('Website:'). '
    397 | '. parseLink(GAME_WEBSITE) .' 398 |

    399 |

    400 | '. tl('Regular Price:'). '
    '; 401 | 402 | if( count($prices) == 0 ) 403 | { 404 | echo '-'; 405 | } 406 | else 407 | { 408 | echo ''; 409 | for( $i = 0; $i < count($prices); $i++ ) 410 | { 411 | $currency = $value = ""; 412 | 413 | foreach( $prices[$i]['price']->children() as $child ) 414 | { 415 | if( $child->getName() == "currency" ) { 416 | $currency = $child; 417 | } else if( $child->getName() == "value" ) { 418 | $value = $child; 419 | } 420 | } 421 | echo ''; 422 | } 423 | echo'
    '.$currency.''.$value.'
    '; 424 | } 425 | 426 | echo'

    427 |
    428 |
    429 |

    '. tl('Description'). '

    430 |

    '. GAME_DESCRIPTION .'

    431 |

    '. tl('History'). '

    '; 432 | 433 | for( $i = 0; $i < count($histories); $i++ ) 434 | { 435 | $header = $text =""; 436 | 437 | foreach( $histories[$i]['history']->children() as $child ) 438 | { 439 | if( $child->getName() == "header" ) $header = $child; 440 | else if( $child->getName() == "text" ) $text = $child; 441 | } 442 | echo ''.$header.' 443 |

    '.$text.'

    '; 444 | } 445 | 446 | if( defined("GAME_HISTORY") ) { 447 | echo '

    '. GAME_HISTORY .'

    '; 448 | } 449 | 450 | for( $i = 0; $i < count($histories); $i++ ) { 451 | $header = $text =""; 452 | 453 | foreach( $histories[$i]['history']->children() as $child ) 454 | { 455 | if( $child->getName() == "header" ) { 456 | $header = $child; 457 | } else if( $child->getName() == "text" ) { 458 | $text = $child; 459 | } 460 | } 461 | echo ''.$header.'

    '.$text.'

    '; 462 | } 463 | 464 | echo '

    '. tl('Features'). '

    465 |
      '; 466 | 467 | for( $i = 0; $i < count($features); $i++ ) 468 | { 469 | echo '
    • '.$features[$i].'
    • '; 470 | } 471 | 472 | echo '
    473 |
    474 |
    475 | 476 |
    477 | 478 |

    '. tl('Videos'). '

    '; 479 | 480 | if( count($trailers) == 0 ) 481 | { 482 | echo '

    '. tlHtml('There are currently no trailers available for %s. Check back later for more or contact us for specific requests!', GAME_TITLE) .'

    '; 483 | } 484 | else 485 | { 486 | for( $i = 0; $i < count($trailers); $i++ ) 487 | { 488 | $name = $youtube = $vimeo = $mov = $mp4 = ""; 489 | $ytfirst = -1; 490 | 491 | foreach( $trailers[$i]['trailer']->children() as $child ) 492 | { 493 | if( $child->getName() == "name" ) { 494 | $name = $child; 495 | } else if( $child->getName() == "youtube" ) { 496 | $youtube = $child; 497 | 498 | if( $ytfirst == -1 ) { 499 | $ytfirst = 1; 500 | } 501 | } else if( $child->getName() == "vimeo" ) { 502 | $vimeo = $child; if( $ytfirst == -1 ) { 503 | $ytfirst = 0; 504 | } 505 | } else if( $child->getName() == "mov" ) { 506 | $mov = $child; 507 | } else if( $child->getName() == "mp4" ) { 508 | $mp4 = $child; 509 | } 510 | } 511 | 512 | if( strlen($youtube) + strlen($vimeo) > 0 ) 513 | { 514 | echo '

    '.$name.' '; 515 | $result = ""; 516 | 517 | if( strlen( $youtube ) > 0 ) { 518 | $result .= 'YouTube, '; 519 | } 520 | if( strlen( $vimeo ) > 0 ) { 521 | $result .= 'Vimeo, '; 522 | } 523 | if( strlen( $mov ) > 0 ) { 524 | $result .= '.mov, '; 525 | } 526 | if( strlen( $mp4 ) > 0 ) { 527 | $result .= '.mp4, '; 528 | } 529 | 530 | echo substr($result, 0, -2); 531 | 532 | if( $ytfirst == 1 ) 533 | { 534 | echo '

    535 | 536 |
    '; 537 | } elseif ( $ytfirst == 0 ) { 538 | echo '
    539 | 540 |
    '; 541 | } 542 | echo '

    '; 543 | } 544 | } 545 | } 546 | 547 | echo '
    548 | 549 |

    '. tl('Images') .'

    '; 550 | 551 | if( file_exists($games_location.$game."/images/images.zip") ) 552 | { 553 | $filesize = filesize($games_location.$game."/images/images.zip"); 554 | if( $filesize > 1024 && $filesize < 1048576 ) { 555 | $filesize = (int)( $filesize / 1024 ).'KB'; 556 | } 557 | if( $filesize > 1048576 ) { 558 | $filesize = (int)(( $filesize / 1024 ) / 1024 ).'MB'; 559 | } 560 | 561 | echo '
    '. tl('download all screenshots & photos as .zip (%s)', $filesize) .'
    '; 562 | } 563 | 564 | echo '
    '; 565 | if ($handle = opendir($games_location.$game.'/images')) 566 | { 567 | $found = 0; 568 | /* This is the correct way to loop over the directory. */ 569 | while (false !== ($entry = readdir($handle))) 570 | { 571 | if( substr($entry,-4) == ".png" || substr($entry,-4) == ".gif" ) 572 | { 573 | if( substr($entry,0,4) != "logo" && substr($entry,0,4) != "icon" && substr($entry,0,6) != "header" ) 574 | { 575 | echo '
    '.$entry.'
    '; 576 | $found++; 577 | } 578 | } 579 | } 580 | } 581 | echo '
    '; 582 | 583 | closedir($handle); 584 | 585 | if ($found == 0) { 586 | echo '

    '. tlHtml('There are currently no screenshots available for %s. Check back later for more or contact us for specific requests!', GAME_TITLE) .'

    '; 587 | } 588 | 589 | echo '
    590 | 591 | '; 592 | 593 | if( file_exists($games_location.$game."/images/logo.zip") ) 594 | { 595 | $filesize = filesize($games_location.$game."/images/logo.zip"); 596 | if( $filesize > 1024 && $filesize < 1048576 ) { 597 | $filesize = (int)( $filesize / 1024 ).'KB'; 598 | } 599 | if( $filesize > 1048576 ) { 600 | $filesize = (int)(( $filesize / 1024 ) / 1024 ).'MB'; 601 | } 602 | 603 | echo '
    '. tl('download logo files as .zip (%s)', $filesize) .'
    '; 604 | } 605 | 606 | echo '
    '; 607 | 608 | if( file_exists($games_location.$game.'/images/logo.png') ) { 609 | echo '
    logo
    '; 610 | } 611 | 612 | if( file_exists($games_location.$game.'/images/icon.png') ) { 613 | echo '
    logo
    '; 614 | } 615 | 616 | echo '
    '; 617 | 618 | if( !file_exists($games_location.$game.'/images/logo.png') && !file_exists($games_location.$game.'/images/icon.png')) { 619 | echo '

    '. tlHtml('There are currently no logos or icons available for %s. Check back later for more or contact us for specific requests!', GAME_TITLE) .'

    '; 620 | } 621 | 622 | echo '
    '; 623 | 624 | if( count( $awards ) > 0 ) 625 | { 626 | echo('

    '. tl('Awards & Recognition') .'

    '); 627 | echo('
      '); 628 | 629 | for( $i = 0; $i < count($awards); $i++ ) 630 | { 631 | $description = $info = ""; 632 | foreach( $awards[$i]['award']->children() as $child ) 633 | { 634 | if( $child->getName() == "description" ) { 635 | $description = $child; 636 | } else if( $child->getName() == "info" ) { 637 | $info = $child; 638 | } 639 | } 640 | echo '
    • "'.$description.'" '.$info.'
    • '; 641 | } 642 | 643 | echo '
    '; 644 | echo '
    '; 645 | } 646 | 647 | if( count($quotes) > 0 ) 648 | { 649 | echo '
    650 | 651 |

    '. tl('Selected Articles') .'

    652 |
      '; 653 | 654 | for( $i = 0; $i < count($quotes); $i++ ) 655 | { 656 | $name = $description = $website = $link = ""; 657 | foreach( $quotes[$i]['quote']->children() as $child ) 658 | { 659 | if( $child->getName() == "description" ) { 660 | $description = $child; 661 | } else if( $child->getName() == "name" ) { 662 | $name = $child; 663 | } else if( $child->getName() == "website" ) { 664 | $website = $child; 665 | } else if( $child->getName() == "link" ) { 666 | $link = $child; 667 | } 668 | } 669 | echo '
    • "'.$description.'"
      670 | - '.$name.', '.$website.'
    • '; 671 | } 672 | 673 | echo '
    '; 674 | echo '
    '; 675 | } 676 | 677 | 678 | if( $press_request == TRUE ) 679 | { 680 | echo '

    '.tl('Request Press Copy').'

    '; 681 | echo '

    '. tl("Please fill in your e-mail address below to complete a distribute() request and we'll get back to you as soon as a press copy is available for you.") .'
    '; 682 | echo '

    '; 683 | echo '
    '; 684 | echo ''; 685 | echo '
    '; 686 | echo ''; 687 | echo '

    '. tlHtml('Alternatively, you can always request a press copy by sending us a quick email.').'

    '; 688 | echo '
    '; 689 | echo '
    '; 690 | } else { 691 | if( $press_request_fail == TRUE ) { 692 | echo '

    '.tl('Request Press Copy').'

    '; 693 | echo '

    '.$press_request_fail_msg.'

    '; 694 | echo '
    '; 695 | } 696 | if( $press_request_outdated_warning == TRUE ) { 697 | echo '

    '.tl('Request Press Copy').'

    '; 698 | echo '

    '.tl("We are afraid this developer has not upgraded their presskit() to use distribute(). For security purposes, this form has been disabled.").'

    '; 699 | echo '
    '; 700 | } 701 | } 702 | 703 | if( $monetize >= 1 ) 704 | { 705 | echo '

    '. tl('Monetization Permission') .'

    '; 706 | if( $monetize == 1 ) echo('

    '. tl('%s does currently not allow for the contents of %s to be published through video broadcasting services.', COMPANY_TITLE, GAME_TITLE) .'

    '); 707 | if( $monetize == 2 ) echo('

    '. tl('%s does allow the contents of this game to be published through video broadcasting services only with direct written permission from %s. Check at the bottom of this page for contact information.', COMPANY_TITLE, GAME_TITLE) .'

    '); 708 | if( $monetize == 3 ) echo('

    '. tl('%s allows for the contents of %s to be published through video broadcasting services for non-commercial purposes only. Monetization of any video created containing assets from %s is not allowed.', COMPANY_TITLE, GAME_TITLE, GAME_TITLE) .'

    '); 709 | if( $monetize == 4 ) echo('

    '. tl('%s allows for the contents of %s to be published through video broadcasting services for any commercial or non-commercial purposes. Monetization of videos created containing assets from %s is legally & explicitly allowed by %s.', COMPANY_TITLE, GAME_TITLE, GAME_TITLE, COMPANY_TITLE) .' '. tlHtml('This permission can be found in writing at %s.', 'https://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'https://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) .'

    '); 710 | echo '
    '; 711 | } 712 | 713 | 714 | echo ' '; 715 | 716 | for( $i = 0; $i < count($additionals); $i++ ) 717 | { 718 | $title = $description = $link = ""; 719 | foreach( $additionals[$i]['additional']->children() as $child ) 720 | { 721 | if( $child->getName() == "title" ) { 722 | $title = $child; 723 | } else if( $child->getName() == "description" ) { 724 | $description = $child; 725 | } else if( $child->getName() == "link" ) { 726 | $link = $child; 727 | } 728 | } 729 | 730 | if( strpos(parseLink($link),'/') !== false ) { 731 | $linkTitle = substr(parseLink($link),0,strpos(parseLink($link),'/')); 732 | } else { $linkTitle = $link; } 733 | 734 | echo '

    735 | '.$title.'
    736 | '.$description.' '.$linkTitle.'. 737 |

    '; 738 | } 739 | 740 | echo '
    741 | 742 |

    '. tl('About %s', COMPANY_TITLE) .'

    743 |

    744 | '. tl('Boilerplate'). '
    745 | '. COMPANY_DESCRIPTION .' 746 |

    747 | 748 |

    749 | '. tl('More information'). '
    750 | '. tlHtml('More information on %s, our logo & relevant media are available here.', COMPANY_TITLE, '../'. $languageQuery). ' 751 |

    752 | 753 |
    754 | 755 |
    756 |
    757 |

    '. tl('%s Credits', GAME_TITLE) .'

    '; 758 | 759 | for( $i = 0; $i < count($credits); $i++ ) 760 | { 761 | $previous = $website = $person = $role = ""; 762 | foreach( $credits[$i]['credit']->children() as $child ) 763 | { 764 | if( $child->getName() == "person" ) { 765 | $person = $child; 766 | } else if( $child->getName() == "previous" ) { 767 | $previous = $child; 768 | } else if( $child->getName() == "website" ) { 769 | $website = $child; 770 | } else if( $child->getName() == "role" ) { 771 | $role = $child; 772 | } 773 | } 774 | 775 | echo '

    '; 776 | 777 | if( strlen($website) == 0 ) 778 | { 779 | echo ''.$person.'
    '.$role; 780 | } 781 | else 782 | { 783 | echo ''.$person.'
    '.$role.''; 784 | } 785 | 786 | echo '

    '; 787 | } 788 | 789 | echo '
    790 |
    791 |

    '. tl('Contact') .'

    '; 792 | 793 | for( $i = 0; $i < count($contacts); $i++ ) 794 | { 795 | $link = $mail = $name = ""; 796 | foreach( $contacts[$i]['contact']->children() as $child ) 797 | { 798 | if( $child->getName() == "name" ) { 799 | $name = $child; 800 | } else if( $child->getName() == "link" ) { 801 | $link = $child; 802 | } else if( $child->getName() == "mail" ) { 803 | $mail = $child; 804 | } 805 | } 806 | 807 | echo '

    '; 808 | 809 | if( strlen($link) == 0 && strlen($mail) > 0 ) { 810 | echo ''.$name.'
    '.$mail.''; 811 | } 812 | if( strlen($link) > 0 && strlen($mail) == 0 ) { 813 | echo ''.$name.'
    '.parseLink($link).''; 814 | } 815 | 816 | echo '

    '; 817 | } 818 | 819 | echo '
    820 |
    821 | 822 |
    823 | 824 |

    presskit() by Rami Ismail (Vlambeer) - also thanks to these fine folks

    825 |
    826 |
    827 |
    828 | 829 | 830 | 831 | 832 | '; 843 | if ( defined("ANALYTICS") && strlen(ANALYTICS) > 10 ) 844 | { 845 | echo ''; 856 | } 857 | echo' 858 | '; 859 | 860 | ?> 861 | --------------------------------------------------------------------------------