ramiismail / dopresskit Goto Github PK
View Code? Open in Web Editor NEWpresskit() - spend time making games, not press.
License: GNU General Public License v3.0
presskit() - spend time making games, not press.
License: GNU General Public License v3.0
Another humble suggestion: The option of having more than one logo/icon variant.
For instance you could prefix the filenames with "icon_" and "logo_". It would also be nice to have a separate section for screenshots with "screenshot_" prefix.
Thanks!
I'm getting this error, and I've only uploaded images and changed data.xml (not index.php) :
Warning: simplexml_load_file(): data.xml:77: parser error : expected '>' in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): </quotes> in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): ^ in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): data.xml:117: parser error : Opening and ending tag mismatch: quotes line 71 and game in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): </game> in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): ^ in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): data.xml:117: parser error : Premature end of data in tag game line 3 in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): </game> in C:\nginx\html\press\index.php on line 67
Warning: simplexml_load_file(): ^ in C:\nginx\html\press\index.php on line 67
Fatal error: Uncaught Error: Call to a member function children() on boolean in C:\nginx\html\press\index.php:69 Stack trace: #0 {main} thrown in C:\nginx\html\press\index.php on line 69
I'm confused about a certain line in create.php
https://github.com/ramiismail/dopresskit/blob/master/archive/create.php#L335
From what I understand the code works something like this (I'm using pseudocode here):
if (upgrade) {
...
// Show the todo list for upgrading
...
} else if (installation) {
...
// Show the todo list for installation
...
} else {
// It's a game page
if (game_data_xml_exists) {
// Finished!!!
} else {
// Show todo list for game page
if (there_is_a_data_xml_file_in_images_directory) { // <-- WTF?
// Finished!!!
} else if (required_done) {
// final step asking to change _data.xml to data.xml
}
}
}
What I don't understand is why data.xml would be in the images directory. There's no other code that reads this later on.
Also, if this meant to be the data.xml file in the game directory then that puzzles me even more, since that would go to the other branch of the if statement (the first "// Finished!!!" in the code above).
Is this intentional or accidental? As far as I can see, this won't actually cause any errors but it does add some cruft to the code which threw me off.
Line 158 in a6e0d1f
Is it possible to swap all, if not most, of the links to https to support secured web pages?
Mainly just cloudflare & youtube/vimeo links in the PHP files.
Submitting keys separated by semicolons breaks them into multiple keys - this is documented behaviour so that's fair enough. However, it renders URLs with HTML escapes unusable as keys.
Related to #59.
The static text on presskit() needs to be translatable in some way. This would mean that on a presskit(), if translation files are provided, people can offer their presskit() and content in a different language.
I am not sure how the functionality would be implemented, but my current thought is presskit() scans for language files in a /lang/ folder in root. Files there will be loaded as 'language', and project folders will be scanned for data-[language].xml files to see if language specific content exists. Note that both index.php and sheet.php will need to be affected by the translations.
presskit() will default to English always, and English content is expected from the default data.xml file. Even though I'm passionate about breaking language barriers, the reality is that the majority of gaming press is English. In that regard, presskit() will continue its tradition of nudging users to do things that are good for them.
Changing language would be done with a dropdown presented in the top right of every language page.
Notes
I do all the steps but when I arrive at the last one and click 'take me there already' the process restarts itself and the first installation screen appears. What's going on?
Hello! Thanks for making dopresskit - it's been great.
I added an option to set the favicon per-project. I'm not sure if you'd even want to add it to the main repository, but I will share nonetheless. The patch below details the changes to sheet.php. To use it, set the XML tag "favicon-url" in the project's data.xml. If no tag is specified, it defaults to the site's root favicon. Example:
<favicon-url>http://mysite.com/myfavicon.png</favicon-url>
I've had to customize the scripts a bit for my own needs, and I have everything on a Mercurial repository on Bitbucket, so I'm not sure the best way to share this....... Will just copy the patch as-is and let someone add it if they want :P
# HG changeset patch
# User Shyam Guthikonda <[email protected]>
# Date 1393336529 -32400
# Node ID 98fced7e14df423b4ab5950560e985cb307af5f7
# Parent 74c6db0fe9dcd6ade862e6e333df2bafeecee82f
Allow customization of favicon per-project.
diff --git a/sheet.php b/sheet.php
--- a/sheet.php
+++ b/sheet.php
@@ -106,6 +106,9 @@
case("website"):
define("GAME_WEBSITE", $child);
break;
+ case("favicon-url"):
+ define("FAVICON_URL", $child);
+ break;
case("platforms"):
$platforms = array();
$i = 0;
@@ -293,6 +296,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>'. COMPANY_TITLE .'</title>
+
+ ';
+
+ // Set project favicon if specified.
+ if (defined("FAVICON_URL")) {
+ echo '
+ <link rel="icon" href="'. FAVICON_URL .'" type="image/x-icon" />
+ ';
+ }
+
+echo '
<link href="http://cdnjs.cloudflare.com/ajax/libs/uikit/1.2.0/css/uikit.gradient.min.css" rel="stylesheet" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
Hi, Thanks for all this good work.
I have some questions and remarks about dodistribute:
" There are no pending requests for [game] right now! Send press to [the distribute() link]<--(this link) to get new requests. -"
That's all for now
We distribute keys for drm-free copies of our game through itch.io; however, we've just discovered after sending out many keys that all of them are unreadable due to colons and slashes being stripped from the resulting keys.
Please don't modify the user-input key data, there's no good reason for this.
For superhypercube our year-old presskit() contains some old game screenshots that we need to get rid of because they are inaccurate, and journos are using them for launch. (panic!)
we deleted all the old images in the folder, but they are still showing up if you load the presskit. (even with a clean refresh)
is there anything happening on the presskit() side that we need to change? where are these pulling from?
Is this just an issue with our web hosting, like propagation or somesuch? (we use Dreamhost) It's weird to not be able to immediately see changes we make...
for games that are on PC / Mac / Linux on Steam, this is somewhat misleading
Hi everyone,
Can someone explain how to move the logo into the logo section? I've named the file logo.png, but it keeps appearing in images.
The function that parses links creates problems with trailing slashes at the end.
It's unfortunately unusable at the moment, as the dropbox link used in Install.php is expired.
This is a feature interest that I would develop and pull request. I want to gauge interest first.
When a link of a presskit()
site is shared on Facebook, Twitter, or Google+, the display image and description is 'best guess' and not ideal. On Facebook and Google, the use of Open Graph tags would make the display much richer, and a few more tags for Twitter Cards.
The information presskit()
asks for anyway would be more than enough to fill out this information, but coding in optional variables for custom alterations. Facebook & Google+ will work the moment the pages are published (no Facebook App IDs required). Twitter Cards require a one-time registration step per domain.
Would this be of interest? I'm not sure how public people would want their presskit()
, but it's not hard to implement.
Filling additionals menu as in manual, shows link names as "http:" instead of domain name.
Code in data.xml:
<additional>
<title>Katata Blog</title>
<description>We're keeping a record of our struggles as game developers</description>
<link>http://katatagames.com/category/blog</link>
</additional>
Expected result:
We're keeping a record of our struggles as game developers katatagames.com.
(where "katatagames.com" is a link to http://katatagames.com/category/blog)
Actual result:
We're keeping a record of our struggles as game developers http:.
(where "http:" is a link to http://katatagames.com/category/blog)
Examples:
http://katatagames.com/press/
https://www.vlambeer.com/press/
Examples without bug:
http://younghorsesgames.com/press/sheet.php?p=octodad_dadliest_catch
http://press.headbang.club/sheet.php?p=double_kick_heroes
i just noticed this when i trying to link promotor & presskit() ...
"wrapper is disabled in the server configuration by allow_url_fopen=0"
mediatemple say they'd rather it wasn't turned on
https://kb.mediatemple.net/questions/793/Why+is+allow_url_fopen+disabled+on+the+Grid%3F#gs
i guess for example if the script i call (the promoter page) gets hacked, they could then access / do stuff to my server? curl instead of fopen to get the xml?
http://php.net/manual/en/book.curl.php
what are your thoughts?
Install.php does not gracefully error or offer alternatives when PHP SAFE MODE is enabled.
Right now presskit(); is updating itself from the following two URL's:
and in case the files fail to update themselves , a Dropbox link is used as a backup
Perhaps we can try to pull updates from the repository itself?
since promoter provides data from another server, this can trigger some errors unless you open up this potential security hole:
http://mediatemple.net/community/products/all/204643900
there's apparently a curl() option that is safer?
or customizable platform name for the Other category.
The XML node <monetization-permission>...</monetization-permission>
is missing from the template _data.xml
Hello there, I'm getting the message "There is no method to communicate with distribute() available on your server." every time I try to embed the distribute() to my website.
Right now I'm hosting the website on an EC2 Ubuntu Instance in Amazon Web Services with PHP 7.1 and Apache2. I already tried to allow "allow_url_fopen" and "allow_url_include" and restart the apache but that didn't solve my problem.
[EDIT] I installed curl-ext to PHP 7.1 and now I get a different message, the page redirects to: https://dodistribute.com/access/add/ some ID here and an array says:
{"status":"FAIL","message":"Key invalid","data":null}
Anyone here had a similar problem or can help me solve the problem?
[EDIT2] I managed to fix this problem by removing the file's extension.
Style.css is not responsive for mobile devices. The menu on the left overlays other text if the window is sized down horizontally and on mobile devices.
Currently presskit doesn't support ssl (using https://).
When i connect to my presskit installation using ssl, i get multiple mixed content errors.
e.g.:
Mixed Content: The page at 'https://press.mydomain.com/sheet.php?p=template' was loaded over HTTPS, but requested an insecure script 'http://cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.min.js'. This request has been blocked; the content must be served over HTTPS.
PHP is seemingly setup fine on my system or I couldn't even see this much -- I looked at the PDF instructions and doesn't seem to specify anything special for the setup. Any ideas?
Here is my php info/setup:
https://www.throneoflies.com/press/test.php
EDIT: F12 console shows this:
I am adding the following to the bottom of my already existing and implemented data.xml for my game project, before
<promoter>
<product> ... </product>
</promoter>
This causes that particular project page not to load with 500 internal server error. I checked the error_log and there is nothing that isn't normally there (PHP Warning: Module 'zip' already loaded in Unknown on line 0).
Do I need to reinstall the press kit and enable a particular setting? I have changed a number of links from http to https within sheet.php (things like youtube embed or the j-query library links), however even removing that/implementing it for the Promoter line made no change:
$promoterxml = simplexml_load_file('https://promoterapp.com/dopresskit/'.$promotercode);
Thanks,
Vicky
I've got presskit installed, and can create projects. However, when I view my projects and have "display errors" turned on in PHP, I get a bunch of undefined variable errors for "promoterquotes", "promoterawards", "histories", etc. Is this expected? If I turn off "display errors" in my PHP settings, everything looks correct.
Sometimes a large number of keys may have been submitted by mistake, or is no longer valid. Currently it seems the only way to remove keys is by clicking the x
next to each one, and then clicking "ok" in the box that pops up. This is unusable for situations where you have to remove a hundred or more keys... such as those mangled by issues #60 and #59.
The actual value is not shown
HHVM seems a bit stricter about what you can pass around as constants and how.
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 74
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 77
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 80
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 86
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 83
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 110
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 113
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 89
Line 74 in a6e0d1f
This leads into trouble displaying some of the titles from the xml file.
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 213
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 222
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 223
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 223
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 265
Notice: Use of undefined constant COMPANY_BASED - assumed 'COMPANY_BASED' in /var/www/<redacted>/index.php on line 266
Notice: Use of undefined constant COMPANY_DATE - assumed 'COMPANY_DATE' in /var/www/<redacted>/index.php on line 270
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 274
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 274
Notice: Use of undefined constant COMPANY_CONTACT - assumed 'COMPANY_CONTACT' in /var/www/<redacted>/index.php on line 278
Notice: Use of undefined constant COMPANY_CONTACT - assumed 'COMPANY_CONTACT' in /var/www/<redacted>/index.php on line 278
Notice: Use of undefined constant COMPANY_PHONE - assumed 'COMPANY_PHONE' in /var/www/<redacted>/index.php on line 323
Notice: Use of undefined constant COMPANY_DESCRIPTION - assumed 'COMPANY_DESCRIPTION' in /var/www/<redacted>/index.php on line 328
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 467
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 499
Which leads into COMPANY_TITLE and the others to bleed onto the final result page instead of the parsed results.
The suggestion from the HHVM devs is to cast $child into string every time it gets used. They suspect that is what Zend is doing under the table silently and why it works in mainline PHP.
define("GAME_TITLE", (string)$child);
E.g. on our Finji presskit install, i would love to list http://playfeist.net/presskit/sheet.php?p=feist under our projects, but i do not see a way to do that, i might have missed something though! thanks
When when using <histories><history><header></><text></></></>
format in a game sheet, all paragraphs output twice.
Line 518 of index.php,
I changed:
"http://'.parseLink($link).'/"
to:
"http://'.parseLink($link).'"
and fixed my issue.
@ramiismail How do you feel about porting the code to use Flight so that we can more easily create clean urls and use views?
It will add some extra files to the project and entail some big changes to the code, but I think it should be very do-able to keep everything compatible, to keep a working install.php and to make everything much easier to maintain in the long run (especially for people who aren't familiar with the codebase). So what do you think?
The readdir() method sorts objects in the filesystem order, but i think it would be nice to sort images alphabetically so you can have some control of the order.
I've fixed it locally but want to suggest you change the code to something like this:
$images = array();
if ($handle = opendir($game.'/images'))
{
while (false !== ($entry = readdir($handle))) array_push($images, $entry);
sort($images);
}
foreach($images as $entry)
{
// business as usual in here
}
Anyway, thanks for a great project!
Trying to install presskit on my server. Hosting works, I upload install.php, visit it and see the following:
Progress
Don't worry, this should be over before you really notice anything has happened.
Downloading files...
Installing files...
Creating folders...
Deleting residue and temporary files...
Now comes the fun part!
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!
But clicking the button doesn't do anything.
So I look at the Apache error log. This is what I see:
[Fri Aug 22 23:55:39 2014] [error] [client 87.81.202.236] PHP Warning: copy(style.css): failed to open stream: Permission denied in /var/www/press.thewildrumpus.co.uk/public/install.php on line 17, referer: http://press.thewildrumpus.co.uk/
[Fri Aug 22 23:55:39 2014] [error] [client 87.81.202.236] PHP Warning: copy(archive.zip): failed to open stream: Permission denied in /var/www/press.thewildrumpus.co.uk/public/install.php on line 17, referer: http://press.thewildrumpus.co.uk/
[Fri Aug 22 23:55:40 2014] [error] [client 87.81.202.236] PHP Warning: copy(archive.zip): failed to open stream: Permission denied in /var/www/press.thewildrumpus.co.uk/public/install.php on line 17, referer: http://press.thewildrumpus.co.uk/
[Fri Aug 22 23:55:40 2014] [error] [client 87.81.202.236] PHP Warning: mkdir(): Permission denied in /var/www/press.thewildrumpus.co.uk/public/install.php on line 129, referer: http://press.thewildrumpus.co.uk/
[Fri Aug 22 23:55:40 2014] [error] [client 87.81.202.236] PHP Warning: mkdir(): Permission denied in /var/www/press.thewildrumpus.co.uk/public/install.php on line 133, referer: http://press.thewildrumpus.co.uk/
[Fri Aug 22 23:55:40 2014] [error] [client 87.81.202.236] PHP Warning: unlink(archive.zip): No such file or directory in /var/www/press.thewildrumpus.co.uk/public/install.php on line 136, referer: http://press.thewildrumpus.co.uk/
[Fri Aug 22 23:55:40 2014] [error] [client 87.81.202.236] File does not exist: /var/www/press.thewildrumpus.co.uk/public/style.css, referer: http://press.thewildrumpus.co.uk/install.php
After a little while, and Googling these error messages, I twig that it's because the containing folder isn't writable by any user:
v21@boris:/var/www/press.thewildrumpus.co.uk/public$ ls -al
total 16
drwxrwxr-x 2 v21 v21 4096 Aug 22 23:49 .
dr-xr-xr-x 3 root root 4096 Aug 22 23:38 ..
-rwxrwxrwx 1 v21 v21 5466 Aug 22 23:00 install.php
so I set it and it works:
v21@boris:/var/www/press.thewildrumpus.co.uk/public$ sudo chmod a+rw .
v21@boris:/var/www/press.thewildrumpus.co.uk/public$ ls -al
total 16
drwxrwxrwx 2 v21 v21 4096 Aug 22 23:49 .
dr-xr-xr-x 3 root root 4096 Aug 22 23:38 ..
-rwxrwxrwx 1 v21 v21 5466 Aug 22 23:00 install.php
But it would have been a lot easier and less painful if the install script could prompt me that installation had failed, or offer clues as to why.
There are tons of scammers out there where it's quite obvious sometimes (business email won't match youtube email). Unfortunately, so many scammers to the point where the site is one giant honeypot of mismatching email scammers, slightly spelled a bit differently than anything official.
If someone has free time, would be great to have flags and show a # of how many people flagged them (don't need anything special, just the # of how many people flagged them would be good enough).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.