Jump to content
MakeWebGames

Someone

Members
  • Posts

    283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Someone

  1. While asking non-critical questions.... I used $this->moduleName = basename(__DIR__); For reading a file in the module directory. So it would not be problem for anyone to rename the module dir to something else. This will ofcource fail when the hook cache is used. Is there a ready made variable for getting the module name. 80% sure there is not, and no big deal as people should be able to figure out how to change a path.
  2. The fact that they are still up prove nothing. And changing something around does not allow you to take ownership of anything. raven.info is located in Sweden, Sweden is also famous for hosting sites such as piratebay, think they moved after being raided and spent ALOT of money in court. In other words, not easy to get a server taken down there. Also, dint they use another domain before...
  3. Not exactly sure what the deal is, if its a build out of the free version of McCodes, than its not illegal I _think_. Don't quote me. Probably many posts regarding that on the forum. If its built out of McCodes paid versions, you will need a license, even if someone (else) gave it to you. Unless they transfer the license to you. McCodes staff are on this forum, so perhaps they give you their 2 cents on the matter. Besides all that, I deleted everything as soon I saw they used encryption (should be possible to decrypt as its not actually encryption), and had call backs to their site. Cant offer you more help on this tohugh. Best of luck and happy learning :)
  4. Nooooooo, they take another victim. Actually I got fooled by them as well, not using the script of course. Incredible how they keep going, guess I am partly to blame for not opening a paypal dispute though (think I paid with paypal).
  5. Just remember, unless you change the password, a cheating player can go to that url and make cron jobs go faster by keep reloading the page. Ill edit the code out of my post
  6. Ok, no worries if not. Ill just let it crash, the generated error message explains the error very well itself, just wanted to follow best practice, and though I might be overlooking something in how stuff works.
  7. As mr Rebel said see this video
  8. It would be http://www.testgame1.x10.mx/config.php?code=1ecc4bhjhjhhjhjvvfcfca home/gamer123/public_html/ is not part of the url, when you have it working, remember to change the code config.php should be the name of your cron file, and not config file itself
  9. It means that the file is not in that location. Look for typos
  10. Here is if letting it crash, because an undefined index is used: Error: Undefined index: elementName HINT: If you are accessing a GET or POST, make sure to use the isset function.   Error in F:/xampp/htdocs/nwe/modules/bootstrap/lib.php Line 18 Error in F:\xampp\htdocs\nwe\modules\gradient_usernames\content.php Line 61 Error in F:\xampp\htdocs\nwe\libs\common.php Line 554 Error in F:\xampp\htdocs\nwe\index.php Line 324   And here by checking if empty, and if it is throw exception Error: Un-handled Exception: The option argument elementName is required. Sample: $instance->Element(array( 'elementName' => 'inputText' )); Error in F:/xampp/htdocs/nwe/modules/bootstrap/lib.php Line 19 Error in F:\xampp\htdocs\nwe\libs\common.php Line 554 Error in F:\xampp\htdocs\nwe\index.php Line 324   The first one includes this gem: Error in F:\xampp\htdocs\nwe\modules\gradient_usernames\content.php Line 61 Exception called like this: function Element($options = array() ){ if( empty($options['elementName']) ){ throw new ErrorException("The argument elementName is required. Sample:<br>\$instance->Element(array(<br> 'elementName' => 'inputText' <br>));"); } }   EDit 2: Also tried throw new Exception( instead of ErrorException
  11. Exceptions are new to me. How do I give the best error reporting in NWE? Been trying around, like in a class I want to give the game owner a tip when an argument has not been sent to a method. I did throw new Exception('detailed message and sample code'); But then I miss out on the good stuff, like what script and line that method was called from.
  12. I think Greg is out smarting us. Lurking around, until its the perfect engine.
  13. ^That sounds like viable solution. Tested using this in prettymessage.php This detected the correct module in profile, messages and forum. But pretty sure it will fail in some cases. Like if you have two pretty messages boxes on one page, and want something only available in one. $callers = debug_backtrace(); echo $callers[4]['args'][0]; /* echo '<pre>'; print_r($callers); echo '</pre>'; */
  14. Users like to place videos on their profile, forum posts, messages to each other etc. You got me thinking, videos should perhaps not be in _all_ places where pretty message is used. Might add a setting for that. The change is needed for just about any change to urls or images, because the hard coded parsing will change it before you can through the hook.
  15. Sweet, thanks, hope it doesn't crash anything serious :rolleyes: Haha, I have tested some links, and they still work fine this way around. Nobody has pointed out that my module dont work with raw youtube links, so no time pressure from me on this.
  16. I am not really requesting priority of hooks, although that could perhaps be useful. I just request that the hook is ran before the hard coded reg expression.
  17. When I first started making the youtube link parser, I had this issue. It suddenly worked, thought it was magic. Turns out I had made changes to the core engine files doh. To be specific I had moved lines 1385 and 1386 (libs/common.php) to after the Pretty Message hook has ran, and renamed the variables to match up. RunHook("pretty_message.php", "sourceText"); $sourceText = preg_replace_callback('/(^|[^' . "'" . '])(http(|s):\/\/[a-zA-Z0-9\/\-\+:\.\?=_\&\#\;\%\,]*(\.jpg|\.jpeg|\.gif|\.png))($|[^' . "'" . '])/', "PrettyMessageImageReplace", $sourceText); $sourceText = preg_replace_callback('/(^|\s|\>)(http[s]{0,1}:\/\/[a-zA-Z0-9\/\-\+:\.\?=_\&\#\;\%\,]{1,30})([a-zA-Z0-9\/\-\+:\.\?=_\&\#\;\%\,]*)/', "PrettyMessageLinkReplace", $sourceText);   Its not fair that the engine calls first dips on changing links and images :p
  18. Also check your HTTP Cache setting in the admin panel
  19. Aha, good to know I think changing libs/template.php:331 from:   return "<textarea name='msgContent' rows='10'>" . htmlentities($defaultValue) . "</textarea>";   to   return "<textarea name='$elementName' rows='10'>" . htmlentities($defaultValue) . "</textarea>";   solves the problem
  20. Aha, thought your site had crashed. You simply forgot to change $_POST['content'] to $_POST['msgContent'] to reflect your custom changes. Glad that solved, hope Alian will be found
  21. You mean on your game, not name, I guess. Anyhow, I think its due to a missing .htaccess in the modules/avatar/images folder Try to copy paste the .htaccess from modules/messages in to the avatar/images folder. Or make a file there called .htaccess And fill it with <FilesMatch "\.(png|jpg|gif)$"> allow from all </FilesMatch>   As for the file upload, is the file a .jpeg? Renaming the file to .jpg might be enough to get it through the upload. Been meaning to report the missing .htaccess, forgot about it.
  22. What I do when I have no clue what I did wrong, is that I place lines such as   echo 'made it this far 1234'; die;   I start at top and move it down until the other error is displayed. Then I know what line I messed up
  23. You made me look up ajax space invaders, found this https://github.com/mattiasbrand/SpaceInvaders (no ajax in it) its based on using canvas element, simple little game. Now I am drifting of, back to work....
  24. Like here http://www.nw-engine.com/wiki/index.php/Ajax_development The Ajax stuff is very well thought out in my opinion. You should do a check to see that the user is authorized to change the setting though, as you would normally on a page.
  25. No it does not use the token. $_POST["AJAX"]) && $_POST["AJAX"] == "CALLBACK" are sent with the ajax call to the index.php (line 357) if they are there, it will not include the usual stuff, but rather attempt run the registered function. See libs/ajax.php I am still exploring the ajax functions, bet Alain can provide more details
×
×
  • Create New...