-
Posts
2,209 -
Joined
-
Last visited
-
Days Won
47
Content Type
Profiles
Forums
Events
Everything posted by sniko
-
ReactDOM, probably (because I work with it in 2020, it did not come out in 2020)
-
Crons are ok to use, generally speaking. Why do you strongly advice against them?
-
I have! It's really touching on the reality of losing a loved one. I'm glad they are continuing the series
-
😄 Good times - I remember we went on the hot air balloon and we were all....cautious of the heights lmao
-
Your `l.php` script is also prone to XSS... An example: https://mafia-streets.com/l.php?u=l.php%3Cscript%3Edocument.location.href%3D%27https%3A%2F%2Fharrydenley.com%2F%27%3B%3C%2Fscript%3E - of course this is just a PoC, but could be harnessed for CSRF or something else. You do not validate or sanitize if the path is urlencoded
-
You can run everything locally, on your machine which will make it easier as you won't have to rely on the free hosting provider to keep you up or deal with (likely) intrusive ads. https://hub.docker.com/r/mattrayner/lamp Or install mysql and php on your machine and run the server from the game root directory with `php -S localhost:8000` then navigate to http://localhost:8000
-
This means you don't have `ext-mysql` enabled - you can confirm this by running phpinfo() or `php -i`. What kind of server do you have? VPS? Shared? Is your server Linux based or other? Are you familiar with installing and compiling extensions?
-
How did you lose it? Also, I suggest you run your code through version control - such as git - with a good branching model. https://git-scm.com/ https://nvie.com/posts/a-successful-git-branching-model/
-
Hey, so I know some of you here are still having success in running a text-based game in 2020. I am hoping we can crowdsource a list of things a game manager/owner can do to help build their community as well as maintain their existing player-base. I have not run a game or a community in a while, but in theory I know how to maintain one - building one is what I imagine to be the hardest part. How would you go about building a new community? Bimonthly newsletters - Email players twice every month of things that has happened in the game (ie: new Hall of Fame placements) in the last 15 days, what is in the pipeline for new features, and give promocodes out Multiple communication channels - Have an active chat area and even allow for stale chats to stay, this can be in the form of live chat/IRC and forums Run competitions - with tiered prizes for most referrals, most attacks, .... Frequent planned updates - update the game with new features and bug patches on a frequent schedule with a public changelog Mobile-first methodology - optimize the game for mobile and have support for desktop Having clear and enforced community rules - governance is hard but it is critical that your rules are clear and ban hammers are handed out to those who exploit/break the rules What other tactics do you have to build and maintain a community?
-
You can buy your own VPS and install whatever version of PHP you want - even if its deprecated, dropped, and encouraged to not use in production. https://m.do.co/c/b1c2c28c6822
-
What is your budget and timeline for all of this?
-
Is there anything in the error_log? Most likely unable to connect to the database - did you set up a MySQL database, create the tables, and create the database user?
-
Take a look at the documentation: https://api.jquery.com/serialize/ > Note: Only "successful controls" are serialized to the string. No submit button value is serialized since the form was not submitted using a button. For a form element's value to be included in the serialized string, the element must have a name attribute. Values from checkboxes and radio buttons (inputs of type "radio" or "checkbox") are included only if they are checked. Data from file select elements is not serialized.
-
I did, I asked what `vvvvv` was about. Also for better help please start posting a minimal, reproducible example and adding more details to help debug the issue.
-
1. Make use of return statements so you don't need unnecessary if/else blocks 2. Look into Javascript linter (ie: eslint) so you have a consistent style and spacing in your code 3. Wtf is `vvvvvv`? That does not look correct. It looks like you want to check if the url has a query string. Use the native browser API for for this - `location.search`
-
React DOM is a Javascript frontend framework to develop with emphasis on having managed DOM elements - https://reactjs.org/ JWT is a JSON web token that you assign to a client so they can be authorised on the server-side application to communicate with JSON objects to an API, for example - https://jwt.io/introduction/
-
1. You are incorrectly assigning elements with the same id. It should only exist on the DOM once - https://css-tricks.com/the-difference-between-id-and-class/ 2. You do not need the # in the id value - you're confusing things here 3. You can use child selectors in jQuery, since your HTML is constructed in a particular way, we can target with .php__links > li > a https://api.jquery.com/child-selector/ 4. When you are in a callback from a selector, you can use $(this) to use the context instead of reselecting https://stackoverflow.com/a/12481556/3000179 Here is a fiddle of the fixed code: https://jsfiddle.net/ebjz32tq/
-
In my professional-time, a lot 😅 In my hobby-time, a website (... maybe a text based game 😉) with a React DOM frontend communicating to a Laravel backend with JWT authentication
-
The mechanic you're referring to is called "sinks". Gambling games are good timesinks (and moneysinks, which helps with game economy), but usually real-time chats and forums are a good timesink with the added benefit of adding to the community.
-
That's fine - though the games I play are not pay2win and the only things that are available to you are cosmetics, which do not give you an advantage. But, each to his own
-
So a pay2win system? You'll likely attract a few, but not the majority.
-
1. Remove the `global` stuff on line 4 - it is not needed here (plus the use of global is an antipattern) 2. Format your PHP code to make it easier to read and uniformed - php-cs-fixer is a good tool. 2a. Wtf is this spacing? So many empty lines. Look into PSR-2. 3. Generally speaking, your MySQL column names should be lower case (snake_case if needed) 4. You should have your default value as `NULL` instead of `(string) None` - it will make it easier to read and show intention of the column IMO 5. When doing comparisons, be in the habit of doing type comparisons too (ie: `===`). If doing a string comparison, cast both to the same case (ie: `strtolower()`) so you won't get unintended logic (ie: if somehow the column value is `none` instead of `None`) 6. Try to stay away from hardcoded values. Ideally you'd have a database table to lookup the house_id to the house_name 7. Get in the habit of using `require` instead of `include`. Since globals.php is an important file, you will want the script to halt if it does not exist. > Does it matter the table is enum? Yes, what are the values of this enum?
-
Yes they do, look into RecursiveArrayIterators - or even if you are passing in a multidimensional array for something, there should be a typed interface for structure validation, so you can iterate on the expected/known leaf keys
-
I mean damn, have you tried getting a MSB to upgrade from php5.6, not to mention large corporations running on legacy shit 😅