Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

php_penguin

Privileged
  • Joined

  • Last visited

Everything posted by php_penguin

  1. wtf.... not entirely sure why someone would post this...
  2. Asking this question reveals an underlying flaw in your process. You need to have clear goals at the start of a process for there to ever be a finish to it. Simple stuff like "looks good" doesn't cut the mustard, whereas stuff like: * design appeals to our target audience (i.e. male/female, techie etc.) * works well enough in IE6, IE7, FF (91% of browsers) * works well enough with JavaScript disabled * design is accessible to visually-impaired (e.g. colorblind, poor contrast.. not necessarily blind) * provides the information in a clear + concise way Obv from that list you can guess i am pretty much function over form, but giving yourself simple targets like that, which are definitely "yes" or "no" can really help to finish a project. From simple tasks like this you can create a multitude of smaller, more precise tasks. Once you feel you are done with the design, no doubt the client will have his/her say, and reveal a non-techie viewpoint to it.
  3. The spacing issues is because of the text-align justify combined with the small width. Its not something I can really get past...
  4. Yes, there is a problem with not having delivered the goods, but generally with escrow it is considered that if it is delivered to the escrow agent. As long as you have a solid contract (client pays for the work done regardless of completion. This means that if it is cancelled you can claim about 20% of it no problem, more if its later).
  5. no there is nothing that would go badly, as there is no file access or database access going on. Of course, security is imporant, but I will get out of it with this little thing: "I was writing a tutorial on image creation" ;D
  6. 1.6% of the web uses opera... And at any rate the rest of the site works fine in opera. However, i'll just add overflow: hidden to the css.
  7. Have you ever heard of escrow? Its a great way to ensure you get paid. Basically, you pay an impartial third party a small fee (say £20) to hold the final version of the site (on CD or similiar) and the clients payment. Once the client has paid he hands the site onto the client, and pays you the money. There are plenty of proffesional escrow services out there, typically charging between 0.5% and 2% of the fee.
  8. The best thing you can do is get in touch with the team. Outline what you want to do, what the site will provide for the fans, and as such what image you can use. You could get lucky and they say "use our logo no problem" and even better, they might have their own library of images/video for you to use. Furthermore, they may give you a splash of publicity. The level of cooperation you may recieve depends on the size of the club. If it is county/regional you have a pretty good chance but nationals tend to be right james blunts.
  9. Ok sorry for DP, but in the event that the design firm can prove it, DO NOT GIVE A REFUND. There is no legitimate reason for you, and the work was paid for, in terms of your effort, not on the usability of the finished piece. It is not your fault if the copyright was unclear at the time of your commision.
  10. This sounds like a company pissed off because the client went for the cheaper option. Re-occuring changes are the good stuff for many design firms (with new projects being the bread & butter) and so they protect them quite viciously. However, unless the design firm can prove that they still own the copyright, or the client can prove that he bought the design rather than just the right to use the design, then you will reach a stalemate. Basically, call the design firms bluff and say "prove it".
  11. yes, the header is the "unfinished" section of that page... the logo probably isn't gonna look like that, and so it will all be rejigged when the damn owner finally says yes or no on a logo. The titles are there to break up the space, it looks really bland without them. No doubt a bit of graphical magical would help them. The gradients in the boxes go to white because otherwise it look ****. Simple as really. they make the page way too cluttered if the have the bottom bar and the remaining of the side bars showing. They are basically just to hint at the start of a box rather than to define it. I will be making them lighter still. The footer image needs resizing, it is only 700px wide whereas the header + (menu+content) are both 750px wide. What question exactly?
  12. Hey, no problem There are various improvements you can add for this script, such as accepting 3-bit hex codes (eg 0af becomes 00aaff) and taking in keywords (white, black etc), as well as caching the images. However, I will let you figure those ones out
  13. Ok, thought I would jot down some notes from a little project I did a while back. In an ecommerce site, especially clothing, there is often more than one color related to a product. Sometimes showing images of all the different colours is impractical. This is what a colour swatch is for. Heres an example from M&S: http://www.marksandspencer.com/gp/browse.h...=A2BO0OYVBKIQJM So what do you need to make a swatch? [*]PHP 4 / 5 [*]GD library So really, the first stage is to figure out what variables we want to take in... Heres the obvious one: the colour Now, also width and height... and for a special twist, border colour So here we start the script by assigning defaults: <?php $main_color = $_GET['c']; if(!isset($_GET['c'])) { $main_color = "FFFFFF"; } $width = $_GET['w']; if(!isset($_GET['w'])) { $width = "15"; } $height = $_GET['h']; if(!isset($_GET['h'])) { $height = "15"; } $brdr_colour = $_GET['b']; if(!isset($_GET['b'])) { $brdr_color = "000000"; } So far... it does nothing. In fact it will generate an error because i didnt put the ending tag on. But what it does do is set up defaults for if you don't call anything. In this case it will (eventually) make a 15x15 white sqaure with a black border. So now we can move onto the meat of the matter: making an image! Next stage is like so: $image = imagecreate( $width, $height ); Next thing is colours... but wait! *dramatic music here* We need RGB colours, and I have provided HEX!!! So lets get converting: $mc_red = hexdec(substr($main_color, 0, 2)); $mc_green = hexdec(substr($main_color, 2, 2)); $mc_blue = hexdec(substr($main_color, 4, 2)); Simple eh? we substr to get each 2-bit component of the HEX code (RR)(GG)(BB) and then use hexdec to convert it into a decimal. As such 44 will convert into 64 and FF will convert to 255. nifty eh? So we have an image, and we have a colour. But we dont actually have a colour. We need to allocate it: $main_color = imagecolorallocate( $image, $mc_red, $mc_green, $mc_blue ); $brdr_color = imagecolorallocate( $image, $bc_red, $bc_green, $bc_blue ); Ok, so we now have a correctly sized image, two colours (border + bg) and all that is left is to draw the image. First we fill the image with the border color. We could draw four lines, but this is much quicker. imagefill( $image, 0, 0, $brdr_color ); And next draw the main colour over this. imagefilledrectangle( $image, 1, 1, ($width - 2), ($height-2), $main_color); And finally we need to output the image to browser, in PNG (or other desired) format: imagepng($image); imagedestroy($image); imagepng outputs it, imagedestroy removes it from memory (stops the system getting clogged up). So here is the final thing: <?php $main_color = $_GET['c']; if(!isset($_GET['c'])) { $main_color = "FFFFFF"; } $width = $_GET['w']; if(!isset($_GET['w'])) { $width = "15"; } $height = $_GET['h']; if(!isset($_GET['h'])) { $height = "15"; } $brdr_color = $_GET['b']; if(!isset($_GET['b'])) { $brdr_color = "000000"; } $mc_red = hexdec(substr($main_color, 0, 2)); $mc_green = hexdec(substr($main_color, 2, 2)); $mc_blue = hexdec(substr($main_color, 4, 2)); $bc_red = hexdec(substr($brdr_color, 0, 2)); $bc_green = hexdec(substr($brdr_color, 2, 2)); $bc_blue = hexdec(substr($brdr_color, 4, 2)); $image = imagecreate( $width, $height ); $main_color = imagecolorallocate( $image, $mc_red, $mc_green, $mc_blue ); $brdr_color = imagecolorallocate( $image, $bc_red, $bc_green, $bc_blue ); imagefill( $image, 0, 0, $brdr_color); imagefilledrectangle( $image, 1, 1, ($width-2), ($height-2), $main_color); imagepng($image); imagedestroy($image); and heres how you might call it: (after saving it as swatch.php) <img src="swatch.php?c=20AFFF&b=000000" /> Questions, comments, and so on?
  14. Ok, basically a re-skin for Sportsaver.co.uk, which none of you will have heard of heres the old front page: http://www.sportsaver.co.uk/index.php and the new front page : http://www.sportsaver.co.uk/indexnew.php i know nothing else works from the new one, except the FAQ ( all ajax, coded in about 1 hour ), so don't bum me about that
  15. I've been coding PHP for a couple of years now.. actually around 6 years. I'm pretty good at it, and am slowly making money off it. But with each site I make, i get a sense of monotony. Its damn near the same except for the names of the data and the way it is shown. What I am wondering is, who has used/made a framework which allows you complete freedom over input and output, whilst making it ultra-fast to read/write the data. I have thought of creating an API, and writing results of queries into XML and so on. But this makes it difficult to do stuff to do the data once you have it. So yeah, frameworks? how do you guys make them, what have you guys used, and so on.
  16. I am a PHP programmer, and rather than just noobishly saying "PHP is better" I have at least tried to learn ASP a couple of times. However, PHP really is just so much nicer, and for any budding programmer is a better place to start. The reason is the syntax is sooo close to C and Java, without all the horrors of OOP damn near being forced on you. ASP's syntax however, is really only used for ASP. This isn't a huge problem unless you are wanting to learn a new language. Also, there is the price argument, as mentioned by other people already. PHP/MySQL is a free, easy to implement, and powerful combination. ASP, as you already know, requires MS servers (linux can work but its hellish) and software licensing. so to answer your question ASP/.NET is useful for ultra-large / ultra-busy websites, as it can be compiled. PHP is useful for quick-build sites, and budget sites. Of course this doesnt make it any less useful, its just more flexible. The oft-given reason for ASPs widespread use is the mid-level managers and bean counters thinking "we already have lots of MS licenses, why move to Linux servers?". My very-biased opinion is that a new person will find it a lot easier to learn and implement PHP.
  17. the problem you have here is nested quotation marks. to get past this, use \" rather than ' in the window.open. your code should look like this now, and it should work: <body onload="java script:set Timeout('window.open(\"1.html\",\"PAGE NAME\",\"height=615,width=6684,scrollbars=yes\")',10000)"> <p> blah blah where normal content goes </p> </body> Of course, you could write a custom function to make this a lot easier, if it is to be reused: function openWindow( url, name, width, height, scroll, timeout ) { var newwindow = window.open( url, name, 'width='+width+',height='+height,scrollbars=yes'); setTimeout( newwindow, timeout); } and your body would look like this now: <body onload="openWindow( '1.html', 'Page Name', 6684, 615, 10000 );"> hope this helps.
  18. Hi there, I fit the bill perfectly, but I am wondering, is this paid? In reality, social networking sites are starting up ten-a-minute. Damn near all of them fail. Look at the latest creation from the Digg team, its got all the hype but its still failing.
  19. just tested it, and yay, i am god... it worked straight away. however, just tweaked it so its styled a bit and the menus appear to the right of the parent: !!!!!! new css !!!!!! ul, li { display: none; list-style: none; padding: 0px; margin: 0px; } /* hide the ul's, and remove padding, margin, bullets */ ul.menu { display: block; } /* show the top menu */ ul.menu li { display: block; width: 150px; } /* make them appear vertically */ ul.menu a { display: block; padding: 5px; color: #444; text-decoration: none; } /* style the links */ ul.menu a:hover, ul.menu > li:hover > a { background: #eee; } ul.menu li ul { display: none; } /* reinforce "sub is hidden" rule */ ul.menu li:hover ul { display: block; margin-left: 70px; margin-top: -20px; background: #fff; border: 1px solid #444; }/* make the mouseover occur */ ul.menu li ul { position: absolute; } /* this rule makes the sub-items appear 'above' the top menu */
  20. Andyroid, Drop down menus aren't difficult, but it is quite difficult (i can't even think how) to do an on-click drop down. The current set of browsers doesnt have CSS support for click, and especially not for contextual click. To create an onclick dd would need JavaScript. For a mouseover dd, use a set of <ul> and <li>. Something like this: !!!!!!! HTML !!!!!!! <ul class="menu"> <li><a href="#">home</a></li> <li><a href="#">browse</a> <ul> <li><a href="#">mens</a></li> <li><a href="#">womens</a></li> </ul> </li> <li><a href="#">help</a> <ul> <li><a href="#">who are we</a></li> <li><a href="#">faq</a></li> </ul> </li> </ul> !!!!!! CSS !!!!!! ul, li { display: none; list-style: none; padding: 0px; margin: 0px; } /* hide the ul's, and remove padding, margin, bullets */ ul.menu { display: block; } /* show the top menu */ ul.menu li { display: block; width: 150px; } /* make them appear vertically */ ul.menu a { display: block; padding: 5px; color: #444; text-decoration: none; } /* style the links */ ul.menu li ul { display: none; } /* reinforce "sub is hidden" rule */ ul.menu li:hover ul { display: block; }/* make the mouseover occur */ ul.menu li ul { position: absolute; } /* this rule makes the sub-items appear 'above' the top menu */ this is for a vertical cascading menu, i just wrote it from scratch so i havent tested it and it looks like ****.
  21. If its possible for you to meet in person, I highly recommend it. A face-to-face means that any questions can be asked and answered instantly, so there is no time for doubt to formhttp://www.ctrlaltdel-online.com/comic.php. If you answer the questions correctly and provide a decent price you will get the job no problem. With a proposal, even if you provide all the information and a good price, you still get shot down 80% of the time, purely because there is no physical connection. However, in a proposal, you need to keep it non-technical. Thats for the brief. Heres how ive done it in the past: Company Name (yours), date, etc. One line of very brief outline (eg, graphical redesign of bla.com) Expanded proposal (lots of doing words, aim for about 10 lines, or 100 words, no more) "In this capacity we will..." - outline what you will be doing under the current price range "and we will not ..." - outline anything that might realistically be thought of as "included" but isn't priced for. Eg, backend redesign. Price range, wrapped up in lots of "probably" and "could change" stuff. A range is best, because an "upwards of" looks scary. Something like $800 to $1400 will be an example price range. Make sure you state that any changes to this proposal may affect the price, but this is best left for when they look interested.
  22. php_penguin replied to Daimz's topic in Frontend
    z-index is not only for position absolute. If you have a float-left block element of fixed width and overflow "visible", followed by something like a float-left textarea, then the text will be hidden behind the textarea. set the first element to z-index 20 or similiar and you will see the text above the textarea.
  23. ok, heres a chance. You are using | rather than || for OR in your IFs generally speaking, if its in an IF then it will be two chars long.
  24. PHP's error_reporting is a wonderful tool, learn to use it. Try doing this: error_reporting(E_ALL); at the top of the page, do a string replace for any @ symbols in the script, run it, and tell us the output.
  25. simple reason is M$ sucks... but i will expand rather than just sound like a n00b. IE6 has a very rudimentary implemenation of the box model... No wait, it has a very thorough of a box model, it just happens not to be the box model everyone else implements. floats, margins, borders, padding, width... anything to do with anything in IE6+CSS world is screwed up. Unfortunately as of June 07, 37% of users STILL use IE6. Solution lies in browser detection, and fiddling about. Unfortunately 6% of users dont use javascript, probably the same luddites that still use IE6, so anywhere between 2% and 10% of your users will still have problems. Of coruse if its a designer site, dont worry. That lot of trendies all use FF.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.