Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. jsut put the <img> tags in and float them left give them margin-right and margin-bottom in your css and the'll flow beautifully...
  2. No no no. you can't and nor should be able to do this - it would entail you having some control over their system. Forget it and don't even think of it again.
  3. Loading fine for me in IE6 & 7, FF 2, Safari 3, Opera 9. I would however alter these <link href="stylo.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="styloprint.css" media="print" /> to <link rel="stylesheet" type="text/css" href="/stylo.css" /> <link rel="stylesheet" type="text/css" href="/styloprint.css" media="print" /> try clearing your cache and see what happens...
  4. I am - originally from Grimsby - A Town fan hence the 'Mariner' bit but I live up in geordie land now...
  5. div class='sponsor-title'></div> should surely be <h1> ???? <div class='sponsor-content'></div> should just be a series of paragraphs and other markup to display content? use the correct markup for the correct info. DON'T GET DIVITIS...
  6. @ bluebyyou Understood. Its all a question of ratios - get the ratio fo your thumb (114/85 = 1.34) and the ratio of your original. if the original is wider but shorter then you need to adjust the width to 114 and the height to a similar ratio to work that out... $origw=imagesx($src_img); $origh=imagesy($src_img); $thumb_width = 114; $thumb_height = 85; $changeinwidth = $origw/$thumb_width; $newheight = $origh/$changeinwidth;
  7. hmmmmmmmmmmm: nubile young lady asking me for something (happy birthday to me...) OK I don't have time to edit it all so I am attaching the files... Now how to use it... foreach ($_FILES['upfile']['name'] as $key => $value) { if ( $_FILES['upfile']['error'][$key] == 0 ) { $image_arr[$key] = do_uploads ( 'upfile' , '/path/to/upload/dir/' , $key , 500 , 245 , true , 150 , 100 ); } } This particular example requies that your file inputs be named 'upfile[]' e.g. <input type="file" name="upfile[]" /> This allows teh script to handle multiple images being uploaded at once... It loops through each file in the $_FILES array and checks that it uploaded ok if it did then it calls the function to upload the file and do the magic... The function called explained... $image_arr[$key] = do_uploads ( 'upfile' , // name of the form input '/path/to/upload/dir/' , // path to directory file will be saved $key , // current key in teh $_FILES array 500 , // max size of large image 245 , // max height of large image true , // create a thumbnail true = yes, false = no 150 , // max width of thumbnail 100 // max height of thumbnail ); the script requires you to create a folder called 'thumbs' in the directory you are uploading to (you can always mod the class to create it if it doesn't exist). If there is a clash on teh filename then _n will be added to the filename so it doesn't overwrite the image already there. the result of the call is teh files being in their specified location and also an array which gives details on each file - its name, its location, mime type, dimensions etc. just swap the txt extension to php... have fun - feel free to ask questions... the actual resizing is done in the genImage method of the class. You can see all the math there (if you spot an error in the logic or something just fix it - I have a new version of this that works just fine.) [attachment deleted by admin]
  8. http://www.phpfreaks.com/tutorials/71/0.php
  9. firstly grab the aspect ratio of the image (even the bigger ones) then comapre that to the aspect ratio of your defined thumnail... use the result to 'select' a portion of teh orignial that is off the same aspect ratio as your desired thumbnail - when you create the tuhmbnail use the new co-ordinates to select the part of the original (basically you are cropping the image so you will lose a portion at the top and bottom or the left and right). If you want an example of how to do it post back - I'll copy a snippet that I use for resizing/thumbnail creation.
  10. people hate waiting...... are you talking about having a waiting progress bar while teh search goes ahead??? if so forking your script could be the way to go..
  11. array_diff(), array_intersect()....
  12. one method... add 2 fields to the user database table - call one 'online' type = enum 'y','n' the other 'activity' DATETIME (or INT (11) if you prefere timestamp over datetime). when user logins in update table to mark online as yes and update the time it happened. On each page update the activity time. Ste your self a time period (10 mins or so) and when someone attempts to login check online = 'n' if so login if not check activity was more than TIME PERIOD ago - if it was logem in if not boot em and say user is already logged in. Obviously those whose connection dropped out or closed teh broswser will have to wait to login again. Make sure you update 'online' to 'n' if they logout. There is a method where you can use the actual sessions on the server but I haven't done it yet and I can't find the article describing it at the moment.
  13. yes don't set the width of the select box and don't have it contained in an element that has a fixed width.
  14. think its just google recognizing that those pages get heavy use so its lists them too.
  15. Your rproblem lies in the fact that your data lies in a different table to your headers.... now there is LOTS of code in there that looks unnecessary... you don't need a div in each cell, nor the inline-styles nor lots of other stuff... you could save your self A LOT of hassel by getting this right before you proceed... A well structured table will look like this <table summary="summary of data in table - what it means etc."> <thead> <tr> <th>header1</th> <th>header2</th> </tr> </thead> <tbody> <tr> <td>Data 1</td> <td>Data 2</td> </tr> </tbody> </table> I your case all you need is to put you loop inside the <tbody> tags and echo out each row on ech loop... to style them use css (you can give the <th> elements an id or a class (make sure teh id is NOT anywwhere else on teh page) and you can give the <td> elements a class - each to be used in the style sheet to add the style you want.
  16. horses for courses - I think it can depend on other factors - I too have been in situations where height: 1% didn't work and could find no reason why not...
  17. HOORAY FOR MOZ.ORG! Hey if you are gonna compete with someone who doesn't do compliant stuff you may as well have something your own arsenal to hit em with!!!!!
  18. What extra effort?? You code your site to just work - the extra time and effort is rolling some EXTRA js to put the bells and whistles on!!!
  19. <input type="image" src="..." ... /> you are correct tha there are issues with how each browser passes the data about the image button. print_r($_POST) will show you what has been posted and you can then determine which browser is passing what as the value of the image input - the x and y co-ordinate of the clicked portion of the image should be the result but I thin its IE that doesn't pass this...
  20. Did find this http://c0nsumer.livejournal.com/1061555.html
  21. @ suttercain - on the contrary - 'prfessionally' designed sites shoudl work regadless of platform/client and convey information in an organized and structured manner. Document effects (those bits javascript can do) shoudl NOT be a pre-requisite of using the site. Fi you want to 'get with the times' I suggest you develop sites that still work without javascript.
  22. Looks like the old 'hasLayOut' problem... http://www.satzansatz.de/cssd/onhavinglayout.html To remedy give the parent element of the h1 tag a css property that triggers hasLayOut (see http://www.satzansatz.de/cssd/onhavinglayout.html#prop
×
×
  • 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.