Jump to content

MetroidMaster1914

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by MetroidMaster1914

  1. Had modify my surrounding code a bit, but it worked like a charm! Thank you so much.
  2. I have an array that I've compiled, which, when printed, reads as: Array ( [1] => Array ( [file] => wallpaper1024.jpg [width] => 1024 [height] => 768 ) [2] => Array ( [file] => wallpaper800.jpg [width] => 800 [height] => 600 ) ) What I'm trying to do is sort it by the width from least to greatest, so that it results in: Array ( [1] => Array ( [file] => wallpaper800.jpg [width] => 800 [height] => 600 ) [2] => Array ( [file] => wallpaper1024.jpg [width] => 1024 [height] => 768 ) ) I know that there are a number of array sorting functions available, but I can't seem to figure out how to use them to sort this array like I need it to be. Can anyone help me out?
  3. thanks for the link. It says I need a GD library though. How can I find out if I have it on my server, and if it's not there, how can I put it there?
  4. So I'm trying to take an image, not knowing what the image sizes may be, and shrinking it if it's bigger than 100px to a max width/height of 100px. Here is my problem: The page always takes a long time to load when it comes to animated images. Sometimes it just gives up and stops loading the page. The page: http://www.metroidheadquarters.com/staff/ The code used to resize: <img src='<?php echo $avatar; ?>' <?php $imagesize = getimagesize($avatar); $width = $imagesize[0]; $height = $imagesize[1]; if ($width > $height){ if ($width > 100) { echo "width='100'"; } } else { if ($height > 100) { echo "height='100'"; } } ?> alt='<?php echo $name; ?>'> If you need more info, let me know. I'd appreciate any and all help in this matter.
  5. I'm using a Show/Hide code that only works with <div> tags, and not table elements. Thus, I've been forced to recreate what I had in a table in <div> tags. What my problem is is this: I can't put <div> tags next to each other like what <td> tags do. Can anyone help me out in this matter? I've tried to use absolute/relative positioning, but it made a big mess (I don't think I did it right). The web page is here: http://pokedex.metroidheadquarters.com/machop/ CSS: http://pokedex.metroidheadquarters.com/style.css I'm trying to match the bottom description section to the higher on. Any and all help would be appreciated.
  6. I'm new to cookies and such, so I don't know too mauch about illegal use of cookies or third-party cookies or what not, but I have a cookie set by one domain (metroidheadquarters.com) to change skin features on that site. But I also need to access that cookie from another domain (z3.invisionfree.com) to apply the same skin features to that site. Is there any possible way to do this?
  7. I'm trying to code a skin selector for my website, and I'm having trouble changing a cookie when selecting from a select form. Basically what I want to do is something thing like this: <form> <select onChange='<?php setcookie(MHQ_skin, selectedvaluehere, time()+(60*60*24*365)); ?>;window.location.reload();'> <option value='3year'> 3rd Anniversary Skin <option value='orig'> Original Skin </select> </form> Is there anyway way that that's possible? Let me know if you need more info. (I know that code won't work.)
  8. I'm actually trying to get it done with a directory array listing. I'm using a code like this: <?php $dir = '/archives'; $files = opendir($dir); while (false !== ($filename = readdir($dir))) { $files[] = $filename; } rsort($files) for ($i = 0; $i < 4; $i++){ include $files[$i]; } ?> However, when I try to view that, I get this message: Parse error: syntax error, unexpected T_FOR in /home/tartagli/domains/mhq.frih.net/public_html/admin/index.php on line 54 Line 54 is: for ($i = 0; $i < 4; $i++){ I don't know php well, so I can't tell what the syntax error is. Can anyone help?
  9. I don't store my updates in a mysql database, justas .html files in the directory "/archives/". Say you wrote an update at 2:55 pm on March 21, 2007. It would save the update to the file, "/archives/0703211455.html"
  10. Right, I should have been more specific in my first post. I've managed to figure out the part of writing the update to the file, I just don't know how to call up the information I need in the index file.
  11. I'm making an update system where the site admin writes a new update to a file in the archives which contain only the HTML of the update, not the whole page. Then what I want to happen is for the main index.php file to display the latest 5 updates from the archive directory. I'm not sure how to make that happen. Any and all help in this area would be very much appreciated.
  12. I'm fairly new to php coding and I had a question about an update system I'm building for my website. At the moment, in order to make an update on my site, you have to edit the inex file, create an archive file for it and update the RSS feed all by opening it all up in notepad and typing it manually. What I'm looking for is a syste where I go to the admin area of the site, write an update and it posts it in the archives, index and RSS feed. So far, I have managed to get it to where when I write an update it makes a file in the archives with the HTML code needed to display the update. What I need help with is writing a code on the main index.php file that calls up the latest 5 archive files to view. Any and all help would be appreciated, and if you need more ifo on anything just let me know.
×
×
  • 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.