-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
The session cookie is the only cookie you don't need to give notice about. Any additional cookies (Google Analytics or equivalent tracking included), you must display a notice for. I've started to see more and more sites doing this now, and it looks like the most common approach is to display a kind of inline pop-up at the top of the page with a quick explanation and an accept button. Larger sites also sometimes have a link to a more detailed explanation of each cookie used, and/or a more detailed explanation of cookies.
-
Yeah, if mail() returns true but you don't always receive the email, then you need to raise the issue with your provider.
-
I would check the return value from mail(). It could be that your hosting provider is putting too much stress on the mail server and it's not just responding, but because you're not checking the return value from mail() you never know. I would log it with error_log() though, there's no need to tell the user there was an error when the insert still worked.
-
Andy, I don't think anyone's really bothered about selector efficiency. If their browser doesn't support querySelectorAll(), I would imagine half the web doesn't work for them. Harry's (the author's) suggestions are for preventing specificity issues and to create a series of "objects" that can be abstracted and re-used. It requires less CSS, but more mark-up. I would only ever use the approach on a larger site. I don't think it's gripping many people here anyway though I think the idea he has if that with CSS we're always doing the same kind of things to position elements. Having a framework of these objects to choose from speeds up development and takes care of say vertical rhythm, consistent margins, etc. Also allows you to apply a branding / styling layer over each object, without having to specify hundreds of classes that are used throughout the website. As I said, I'm in disagreement with him that this would be useful on smaller sites, but on big ones I can definitely see it's use.
-
I feel you're missing the point. Yes, on a small to medium site that could be what you would do. On a much larger scale though, that's when his ideas becomes useful and show their worth,
-
Just semantics - breadcrumbs are always ordered. I'm not exactly sure what impact that would have though. Not specifying the tag name has other benefits as well, as kicken mentioned. Here's his full post about the "nav" abstraction. Here's a few other useful ones: http://csswizardry.com/2011/09/when-using-ids-can-be-a-pain-in-the-class/ http://csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/ http://csswizardry.com/2011/07/responsive-images-right-now/
-
His "nav" object isn't necessarily the main navigation menu, it's just any horizontal list; main navigation (ul), breadcrumbs (ol), footer navigation (ul), etc. I'm not saying it does everything for you, it just keeps things consistent and re-usable.
-
ul.nav not cannot be used on an ol..? He's basically trying to create abstract classes, or "objects" as he calls them, that any element can inherit to prevent duplicate CSS. On smaller sites I probably wouldn't bother, but on site's like Sky's it's really effective in minimizing the amount of work you have to do. By having standard objects it also makes theming or branding areas of a website differently really easy. Personally I think he's kind of presenting the full-on solution there, I would meet somewhere in the middle for your average site. There's more posts than just that one though..
-
This guy works at the same company I do, and in a new project we've been adopting a lot of the techniques he's written about in his blog. He raises some very good points, I well recommend reading it. http://csswizardry.com/
-
Well to be blunt, I think it would be a complete waste of time using a package like Serif Web Plus. Honestly it's really bad software. I'm not sure from what you've said if it's a game or an eCommerce website you want to create, but these days the visual appeal of a website is very important, and I know that Serif can't produce it. You could use a free template to get you going, and with a bit of time invested in learning HTML/CSS you could quickly start modifying it for your needs. They generally come with a small framework of styles you can use.
-
On a side note... I was once asked to improve the SEO of a website that was made in that Serif (.. Plus is it?) and I have to say the mark-up it produced was horrible. I would avoid it if I were you.
-
XHTML is case-sensitive, and IE's probably quite strict about it. Change the attribute "ID" to lower-case.
-
Don't know how I missed the missing ID before Sounds like the root of the problem right threre. That won't cause a problem given he's declaring the variable within the function scope.
-
No, that's a meta tag. That's in the content body of the response, not the headers.
-
I think the design is okay. It's not the best I've ever seen but there's no real issues with it. The portfolio page is quite dull and basic to be honest, perhaps a thumbnail of each site would help? Also the animation seems really slow when switching between them, which makes it feel like my browser's struggling -- not really the look & feel your customers would be after I'm sure. The contact form looks really squashed together too. In general it's not bad, but I think there's room for some simple improvements. Having said that, I'm not keen at all on the self-rated stars on the front page. That has to go if you ask me. I think it's a bit arrogant to claim that you're a 5-star PHP guru and a 5-star CSS wizard. From the CSS of yours of seen I would disagree anyway.
-
Are you telling the browser what the charset is in the headers? Try adding the following line at the start of your code: header('Content-Type: text/html; charset=utf-8');
-
Which directory structure / naming convention do you prefer?
Adam replied to trq's topic in Miscellaneous
On the topic of interfaces by the way, I think they're better describing the behaviour as opposed to following the naming convention of the class that implements them. For example the native "Iterator" interface, or in the context of Proem you could have the Router implement Routable, or something. Again just gets rid of generic names and doesn't necessarily tie it to any single class. -
Which directory structure / naming convention do you prefer?
Adam replied to trq's topic in Miscellaneous
I think you could have a trade-off between the two. I prefer how it is now, obviously because the classes are better organised. Do you need such deep levelled namespaces though? For example: Why not alter the structure slightly by grouping the request and response classes under a Http namespace..? You still have well organised classes, but remove the need for generic names. -
As mentioned, you should use the CSS display property instead of visibility, but I'm guessing the source of your problem is in the JS. What errors do you get?
-
No need to use a plug-in, in the core you have slideUp() and slideDown() available already, which use the "swing" easing function by default.
-
Understanding oci_bind_by_name() and how array elements can be trusted
Adam replied to AFTNHombre's topic in PHP Coding Help
I see. Well... I guess a guru would know what he's talking about. Thanks. I'm pretty sure I used the &$val method somewhere in my code--somewhere that gets heavy usage. It seems awfully lucky that it didn't blow up in my face. Yeah, references can be risky if not used right. The thing you really need to consider is that after a foreach loop has ended, if you have a reference pointing to an index within the array or another variable, it will still exist after the foreach. So after a foreach loop ends that uses a reference, you should unset the reference. That will ensure any accidental use of the variable wouldn't have any adverse affects. -
Understanding oci_bind_by_name() and how array elements can be trusted
Adam replied to AFTNHombre's topic in PHP Coding Help
PDO vodoo -
Understanding oci_bind_by_name() and how array elements can be trusted
Adam replied to AFTNHombre's topic in PHP Coding Help
Only difference aside from the "?" parameters is: $key+1? Can't help but feel things are being over done here, you can pass parameters to PDO ant it will use them in the context of their data type. -
Understanding oci_bind_by_name() and how array elements can be trusted
Adam replied to AFTNHombre's topic in PHP Coding Help
What I was saying is that when you bind a variable into a statement, you're not binding any particular value or memory address, you're binding the variable. When you use it in a foreach with a reference, the bound parameter is a variable which is a reference to some other variable. When the statement is executed every parameter is bound to the the $val variable, which is a reference back to the last item in the array. I think I misunderstood your second question, but if you bind any variable or array index, whatever the value of it is at the time is what will be used in the execution.