Code Monkey home page Code Monkey logo

dopresskit's People

Contributors

daanbroekhof avatar dearon avatar ramiismail avatar rowebb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dopresskit's Issues

Add more than one icon and logo

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!

PHP Error in Index.php

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

create.php checks for data.xml in an images directory?

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.

dodistribute: Don't separate keys by semicolons

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.

Translation

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

  • The credits line at the bottom of each page should not be changed or modified by translation.
  • The default language will remain English.
  • presskit() is user hosted, so supporting wide compatibility needs to be kept in mind.
  • Some changes are being made simultaneously to this Issue being resolved. I'll try and update the git accordingly.
  • presskit() needs to remain fully functional with just the files from an existing installation. Nothing may break existing data.xml, project data.xml, display order or anything else on a presskit().
  • Bonus points: I would love if the project supported both LTR and RTL languages. Being able to set a flag for that in translations might be useful.

Added Per-Project Favicon Option

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>

feedbacks on dodistribute()

Hi, Thanks for all this good work.

I have some questions and remarks about dodistribute:

  • I'd like to be able to give a key to someone I know without forcing him to do the process. I guess it's something to do with the contacts tab but I can't add contacts myself :)
  • A little bug, I switched from link distribution to steam keys and this link on the /requests/ page is still pointing to my repo, I guess it should be pointing to the distribute link instead

" 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

Image files not deleting

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...

Logo not appearing in logo section

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.

LinkParser broken

The function that parses links creates problems with trailing slashes at the end.

Social Media Tags (OpenGraph & Twitter Cards)

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.

Incorrect link names in additionals

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

fopen link to promoter xml

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?

Error when embedding distribute()

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 needs optimisations

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.

SSL Support

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.

500 internal server error when adding 'promoter'

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

Problem creating projects

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.

dodistribute: allow mass delete of keys

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.

Titles do not work on HHVM

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

define("COMPANY_TITLE", $child);

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);

Structure of the code

@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?

Sort images alphabetically

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!

  • Are

Add documentation for making the container writeable by any user

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.

Need a flag button that simply shows count of reports -- so many scammers

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.