-
Posts
2,921 -
Joined
-
Last visited
-
Days Won
48
Content Type
Profiles
Forums
Events
Everything posted by KyleMassacre
-
Paste what you currently have. I believe there is an issue with your nested ifs
-
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>"; }
-
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)
-
You could probably use some command line tools like imagemigick. Just a quick search and I found something like this.
-
A little old but I made something similar to this
-
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.
-
It looks like your variable should be “effects” and not “effect”. You have $data['effects'] = array('effects',...); Both keys are plural
- 1 reply
-
- 1
-
-
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.
-
[GLV2][MOD][$30] Ajax Chat w/ Private Messages & Gang Chat
KyleMassacre replied to Dave's topic in Paid Modifications
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" -
[GLV2][MOD][$30] Ajax Chat w/ Private Messages & Gang Chat
KyleMassacre replied to Dave's topic in Paid Modifications
You should add one. I’m not sure if you can make it from the “system” for example -
[GLV2][MOD][$30] Ajax Chat w/ Private Messages & Gang Chat
KyleMassacre replied to Dave's topic in Paid Modifications
No chat hook? -
new Hook("alterGlobalTemplate", function ($template) { $template->error = "<strong>ERROR:</strong> <{text}>"; }); You can try the alterGlobalTemplate hook
-
I just logged in/out several times and I couldnt produce the error though I do have the latest version
-
No I haven’t tried just yet. Maybe in the am I can give her a test run
-
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
-
24,583 views. If I had at least a penny for each
-
In your execute method you can pass an array of key => values to bind instead of using bindParam one at a time
-
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:
-
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.
- 17 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
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”.
- 17 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
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?
- 17 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with: