Jump to content
MakeWebGames

KyleMassacre

Members
  • Posts

    2,921
  • Joined

  • Last visited

  • Days Won

    48

Everything posted by KyleMassacre

  1. Paste what you currently have. I believe there is an issue with your nested ifs
  2. Find if (!$_POST['msg'] || !$_POST['title']) { $title = null; $msg = null; if ($_POST['msg']) { $title = "<font color = 'red'><b>Title cannot be blank</b></font>"; } if ($_POST['title']) { $msg = "<font color = 'red'><b>You must enter a comment to post</b></font>"; } And replace with if (!$_POST['msg'] || !$_POST['title']) { $title = null; $msg = null; if (!$_POST['msg']) { $title = "<font color = 'red'><b>Title cannot be blank</b></font>"; } if (!$_POST['title']) { $msg = "<font color = 'red'><b>You must enter a comment to post</b></font>"; }
  3. Either change your textarea name to msg (and remove a name attribute) or change $_POST['msg'] to $_POST['comment'] towards the top (and remove a name attribute)
  4. You could probably use some command line tools like imagemigick. Just a quick search and I found something like this.
  5. A little old but I made something similar to this
  6. I think one of the biggest game killers is probably an inflated economy. You can have tons of content, and a good story line but have too much money in the game to where people can buy anything and everything which kills the fun. Bottom line, create some sort of currency pit. I am also a huge fan of having almost everything locked unless they meet certain criteria. You could have some sort of flag in your database that decides if they can get/use X. Even if my last point is not taken into consideration, at least they have something to look forward to.
  7. It looks like your variable should be “effects” and not “effect”. You have $data['effects'] = array('effects',...); Both keys are plural
  8. To expand on that what @Magictallguy said, if you read that repo and follow the links, the author suggests this package as an alternative and looks really promising.
  9. Lets just say for example a player kills another player, you can add a hook to insert a chat line saying "So and so just killed player so and so". It would just be like kind of "Global Events"
  10. You should add one. I’m not sure if you can make it from the “system” for example
  11. new Hook("alterGlobalTemplate", function ($template) { $template->error = "<strong>ERROR:</strong> <{text}>"; }); You can try the alterGlobalTemplate hook
  12. I just logged in/out several times and I couldnt produce the error though I do have the latest version
  13. No I haven’t tried just yet. Maybe in the am I can give her a test run
  14. ^^^^ @Dave
  15. That is an odd one to say the least. I tried looking at the login/user class and I wonder if changing line 36 from: if (isset($userExists["U_id"])) { $user = new User($userExists["U_id"]); to: if($user = new User($userExists["U_id"])) { Would yield a different result or wrapping it in try/catch. You should probably be putting this stuff in the issue tracker on github though too
  16. 24,583 views. If I had at least a penny for each
  17. I would also like to know if you have request_csrf_html('login') in your form somewhere as well.
  18. I see you have a comment for checking the csrf token but I don’t see the code for that. Check your page for the csrf token function
  19. In your execute method you can pass an array of key => values to bind instead of using bindParam one at a time
  20. IF COL_LENGTH('table_name', 'column_name') IS NULL BEGIN ALTER TABLE table_name ADD column_name INT END You can try something like this:
  21. Now you're getting it. Some of the hooks by the engine may serve some purpose but others are there for people like you or I to implement what happens when that hook is ran. To answer your question Yep! Lets say for example you want to see what a particular user is doing, i'm sure you can set some sort of flag up in the database to track a user id and if it's there you can enter their actions in some sort of log db table.
  22. Like Dayo said, you need to have your listener in <yourmoduleName>.hook.php file and the callback accepts 1 parameter which is an array with key => value pairs. So for example if you were to paste what Dayo wrote for the callback, $actionData["module"] would be “chase”.
  23. In theory that would work if there was a listener named “insert_chat_line”. What you posted was the “Event” portion of it. GL will let you create your own listener(s) that will allow other devs to use your event in their code. So if you created your hook/listener in your “moduleName.hook.php” file called “sims_hook”, I could then create an event and use “sims_hook”, pass in the values you ask for, then your hook would execute the code. Hook names are arbitrary so you are not restricted to hooks created by the engine itself. is that kind of what you are asking?
×
×
  • Create New...