Recent content by Tarzan

  1. T

    PHP array of objects. How to find a specific object?

    I'm starting to moving into a more object oriented approach when creating my PHP scripts. However, there is a scenario that probably is quite common, but I don't know the best way to solve: Finding a specific element in an array. (Before OOP I didn't need to worry since I could find it with SQL...
  2. T

    Session variables not passed

    Hi! It seems like session variables ($_SESSION['variable']) stopped working the other day. Even I've called session_start, the variables aren't populated. I don't believe that I changed anything that should affect this. Is there some problem or change of configuration that I've missed? Or...
  3. T

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

    Hi! Since 3 days back, my cron job can't connect to the database. Returns error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' I've tried to recreate the user in CPanel with no luck. I saw someone else on Starka with this problem. I think it began after some...
  4. T

    Preloading images with Js - body onload or buttom of page?

    I do have Firebug already, but I've never used, or hardly noticed, the Net tab. Very handy for this kind of stuff. Thanks for the tip! Reminds me of the old saying "Give a man a fire and keep him warm for the rest of the day - set a man on fire and keep him warm for the rest of his life." Right...
  5. T

    Preloading images with Js - body onload or buttom of page?

    Hi! I'm pretty new to the whole concept of preloading things with javascript, but it's really neat so I've started using it as much as I can. On the front page of my web strategy game I have thumbnails of game screenshots. To keep the user from waiting for the fullsize images when viewing the...
  6. T

    Clicking links on google-like map (IE7 problem)

    I got it! I had registered events on both mouse down and up: document.onmousedown = mouseDown; document.onmouseup = mouseUp; When the mouse fires, I checked if I was over an A link and didn't do anything if I was. But I forgot about the onmouseup, which loaded the new map parts with AJAX...
  7. T

    Clicking links on google-like map (IE7 problem)

    So there is a difference on how to register the onmousemove? What is the difference between the old MouseMove function and your MouseMoveIE? They look the same to me. If it wasn't clear: the problem isn't that the map doesn't move in IE7, the problem is that IE7 won't follow the A links once...
  8. T

    Clicking links on google-like map (IE7 problem)

    Hi! I'm having a kind of strange problem. It only shows up in old IE (<=7) so if you hate browser backward compatibility, stop reading here. :) In a game I'm working on, I've created a map that is draggable, very much like google maps. On this map there are cities in A tag links. All with...
  9. T

    Cron jobs dead

    Hi! Had some problems with cron jobs, but after a kick from Anna it started working again. I've noticed that Starka have had some problems the last couple of days - and my cron jobs doesn't seem to work. Could it it be that it needs another push? Thanks for the good service by the way!
  10. T

    Cron job problem?

    Hi! I have a cron job that hasn't been running for two days. I thought it might have been something that I did, but now I saw another thread on the same topic. Any known problems? (I'm on starka if that matters) key=$RANDOM; echo $key > /home/username/public_html/.cron_key.txt; wget -O -...
  11. T

    Javscript: Creating a self-closing img tag with createElement?

    Hi! I'm trying to create a img tag dynamically with javascript. So far I've used the createElement function. The problem is however that the created tag seems to be open: <img src="target"> Is there a way to create a self-closing img tag? <img src="target" /> I would prefer not to use...
  12. T

    Using Javascript to check if image has loaded?

    Just a related question, if I use createElement('img') it seems like the img node is created as an open tag (inspected it with FireBug), i.e., <img src="target"> but of course I want a self-closing tag, i.e., <img src="target" /> Is there a way to create a self-closing tag with...
  13. T

    Using Javascript to check if image has loaded?

    Hi! I guess there's an easy fix for this but I really can't find it. I'm not really into javascript so bear with me :) On the title page of my online game I use javascript to display screenshots. I use an invisible fixed ("absolute") positioned div (display: none) as a target for the...
  14. T

    Tips on making game site more attractive

    contland: Thanks! That was a little bit what I was thinking too, Any good ideas on how to add teasers? Maybe a slideshow on the first page with description of the in-game pages? The game overview is probably not enough then? krunalp4199391: The cartoon idea seem to be on and off... some think I...
  15. T

    MySQL database error on Starka - information missing in file

    Since the error doesn't seem to be acknowledged as a general Starka error, I thought I might as well also post that I'm having problem with MySQL statements. All statements returns something similar to: Incorrect information in file: './[database]/[table].frm' Havn't changed anything in the...