Jump to content

Shadowing

Members
  • Posts

    722
  • Joined

  • Last visited

Everything posted by Shadowing

  1. tick as i page views sorry. not sure why i said tick lol. So probably be alright to start me off then later switch over to something else. Plus i'll beable to see limits first hand lol thanks for the help ManiacDan.
  2. idk my site www.stargatesystemlords.com gets aroudn 400 ticks a day so your saying that couldnt support even 50 people?
  3. Well damn lol. thanks alot for that information. maybe i'll just do mysql route and if i see issues then learn how to use rabbitmq. looks like there is alot to it. This is how im doing it now with flat files which i will now change to mysql but anyways. a jquery script looks for updates every 5 seconds. if there was a update then it grabs the new lines of chat. when a user submits a chat it updates then and there. This way it appears to the user that the chat is instant but really its not.
  4. thanks for the reply ManiacDan I read it wasn't a good idea to use mysql for a ajax chat system. Specially since im using it heavy for other things. i close the file right after i open it. so that can still lead to two people opening it up at the same time?
  5. Ive started to use the function "fputs" And I was wondering about something. I'm adding text to a file for a chat system and I was wondering what happend if a user opens a file at the same time another user is and it overwrites it? or is that even possible. is it first come first serve basic? $open = fopen($chat_buffer, "a"); fputs ($open, $filtered . "\n"); fclose ($open);
  6. hehe i figured out my problem lol omg I forgot my function post_chat is looking for a button pressed lol Thanks alot for the help alex
  7. thanks on the reply Alex guess im confused also i dont know why im trying to include the button on it. I'm not trying to get enter to hit the button. im trying to get enter to run the function. I tried your example with no luck
  8. Been reading massive examples on how to do this but for some reason I cant get this to work anyone know how to make it where when I hit enter on the keyboard it runs function "post_chat" <form> <button class="post_button" type="button" id="post_button">Send</button> </form> $(function(){ $('button.#post_button').keydown(function(e){ if (e.keyCode == 13) { post_chat(); // function to run after enter is hit return false; } }); });
  9. opps i meant Filesystem functions
  10. Hey guys i just started to use database functions Few things im not sure about though In order to get fopen and fputs to work I had to enable write on the file permission using filezilla. wouldnt that allow someone to open the file remotely and write to the file? which is not what I want. only want my server to beable to do this.
  11. yah for sure really appreciate all the input I got. thanks guys finally figured out a way to do this with jquery lol. make all links share the same class name then have each link have their own id then if any of those links with that class is clicked it turns the value of the id into a variable and trips the ajax function "planet_details" $(".planet_details").live('click' ,function(event) { event.preventDefault(); planet_details($(this).attr("id")); }); so glad i figured that out. Cause you guys are right much better way of doing it. now i just need to figure out how to do it with mouseover
  12. oh wow I didnt know there was a data attribute thanks for knowledge of that silkfire. I have 15 of these inside a div a user can hover over any of these. When a user moves left and right on a map 15 more appear. So id have to have jquery listen for clicks on any of the 15 with out knowing their ID before hand. if i could get jquery to do that then that would be a suitable replacement so thats the largest deal having jquery know what has been clicked with out knowing its id Your quotes are the opposite of mine kicken so i tried this below which is acctually the newest code im using. changed my mind on a few things. When I use this "onmouseover" is ignored and $picture some how lays inside the img tag. so it just shows $picture on top of the img tag. $picture = "<div class='planet_float'><img src='images/planets/$picture.png'></div>"; $map_array .= "<img id='$address' onmouseover='popup(".htmlentities($picture).")' src='images/star.jpg' style='position:absolute; left:".$b_x."px; top:".$b_y."px; border-style:solid; border-color: yellow;'>";
  13. i could use jquery to target all the anchor selectors with in one div so if any of them get moused over on ( what ever jquery uses for that) then i have to read the id of the link, seperate it so i only see the number then use that number to run my ajax if jquery can read href links then i could store data in the link bleh.php?info=1234
  14. Hey Kay nice job i got it to work like this below $picture = "<div class='planet_float'><img src='images/planets/$picture.png'></div>"; $picture = trim($picture, '\'"\n\r'); $picture = str_replace('"', '"', $picture); $picture = str_replace("'", '', $picture); onmouseover='popup(\"$picture\")' still had to use \ though
  15. idk i couldnt get that to work at all. i cant use just jquery i dont think. or cant think of a way of doing it at least. cause something has to be attached to the link so have somewhere to start from. Really hard to explain lol. i cant just give the link a id and use jquery. cause the id name would always be changing. i figured out that i can do this onmouseover='popup(\"$picture\")' but if I want to add a little html i cant get passed the next set of quotes onmouseover='popup("<div class='planet_float'><img src='images/planets/$picture.png'/></div>")'
  16. thanks guys for the replies yah its on a single line i just did so it was more reader friendly to who viewed my post. not sure what you mean. ajax_popup is a java script function that has jquery/ajax code in it. anyways i had to abandon this whole idea. cause the end game wasnt what i was going to want anyways. working on a differant route atm what im doing is im making a pop up box that shows new updated data every time the mouse hovers over it.
  17. Hey guys im having a real problem trying to make this string happend the problem is passing parameters on the javascript function "onmouseover" $map_array .= "<a href='map.php?planet=$address' onmouseover='ajax_popup ($picture,$detail_name,$stargate_address,$detail_owner,$time_conquered,$time_offset,$detail_siege, $alliance)'> <img src='images/star.jpg' style='position:absolute; left:".$b_x."px; top:".$b_y."px; border-style:solid; border-color: yellow;'></a>"; if I try this it works onmouseover='ajax_popup(1,2,3,4,5,6,7,'> So the problem is when the variables equal words. Cause of the quote issue. Is there like a way i should be using JSON to do what im trying to do? I have to keep this as a php string too. Or end as a php string
  18. ahh nevermind. there is nothing wrong that function. I had another problem that was causing my issue.
  19. Hey guys I'm having a problem with returning some data from with in a function. I'm trying to display display_stars in the "div.map" function a_function(){ $.ajax({ url: "<?php echo LPATH; ?>ajax/map.php?functions="+arrow, type: 'POST', dataType: 'json', data: { }, success: function(response) { $('div.map').html(response.display_stars); } }); }
  20. thanks for the feed back Suebriquet yah all that is known stuff i plan to fix later. Accept the word Stargate running into the Sun I did that on purpose makes it look like its being glared by the sun. I'll probably end up just adding stargate system lords into the back ground picture so then i have tons of fonts to choose from and graphics in photo shop. the Beta fades out cause it would hide the motherships blowing up the death gliders so thats why i did that Not sure im exactly happy with that either. The hyper space window is total crap too lol. I plan to make that look way better. Not just in looks but the animation on it. I had to stop though cause had to get back to the game lol.
  21. I see whats going on now For starters i coded a long time with out using all errors, which is bad cause its real good for seeing mistakes. my other drop down boxes are using a php variable in place of name_list on the orginal example. echo '<option value="' . $value['name'] . '" ' . ($value['name'] == $current['name_list'] ? 'selected="selected"' : '') I see what you are saying now how the variable doesnt exist cause the html doesnt exist i dont understand why it would matter if im displaying one result or more. what the heck lol thanks alot for the help. much appreciated.
  22. another thing if i remove the name i added so its only populating one value. the error goes away
  23. wierd i dont have this issue with other drop down boxes. Im not a big fan of using @ I over looked the bracket being before the end select tag when comparing it to the other drop down boxes i have. but the other ones i have are exactly the same now some times if i do have a undefine variable i'll do $name_list = !isset($name_list) ? '' : $name_list; hmm
  24. here is the new code now after the change to the foreach bracket $result = mysql_query("SELECT name FROM users WHERE monitor ='mod' ORDER BY id DESC") or die(mysql_error()); $mods = array(); while($raw = mysql_fetch_assoc( $result )) { $mods[] = $raw; } echo '<td colspan="3"><select name="name_list" class="textbox" id="name_list">'; foreach($mods as $key => $value) { echo '<option value="' . $value['name'] . '" ' . ($value['name'] == $_POST['name_list'] ? 'selected="selected"' : '') . '> ' . $value['name'] . '</options>'; } echo '</select></td><td class="submit"><input type="submit" name="remove" id="remove" value="Remove"></td>';
  25. thanks xyph that fixed the problem of the 2nd name not being in the drop down box. the error notice still exist though. hmm I did print_r($_POST['name_list']); and got the same error
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.