Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

kedo posted:

https://code.google.com/p/html5shiv/

That's pretty much all you need. Certain really complex stuff (like canvas animation) might not work so well, but the shiv will fix the majority of HTML5 fanciness.

Wow, that worked surprisingly well, I didn't even have to modify any CSS to have it look pretty much the same. Thanks a bunch! I think there might be a couple of instances of styling that are a bit odd, but they're not obvious enough that you think it's broken.

Btw, what's the deal with html5shiv vs html5shim? Both projects are up there on google code and both referenced from the github page of html5shiv.

Adbot
ADBOT LOVES YOU

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Any advice on where to get dirt cheap wildcard certificates that still work? I don't particularly care about the "quality" of the CA, 99.999% of the customers are not going to either. I just want to avoid blowing 300 bucks on one.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Winter is Cuming posted:

So, I figured out you can make a working column grid without needing margins by using text-align: justify. Anyone interested?

I read that article last week too.

http://www.barrelny.com/blog/text-align-justify-and-rwd/

Nebulon Gate
Feb 23, 2013

Hmm, never read it before. Interesting to see I wasn't the first, though. I came up with it through trying to figure out how to use media queries on a grid to allow for different column sizes while still having de-facto margin spacing. e.g. column width is 100% in mobile, six columns in tablet etc.,

http://jsfiddle.net/5mATa/

Nebulon Gate fucked around with this message at 21:34 on Jun 24, 2013

Heskie
Aug 10, 2002

kedo posted:

Also anti-alias that ugly type. :)

Is there a known technique to do this on IE7+/win? I know theres -webkit-font-smoothing: antialiased, and I seem to remember something about text-shadow:0? But is there a known technique for this?


DreadCthulhu posted:

Btw, what's the deal with html5shiv vs html5shim? Both projects are up there on google code and both referenced from the github page of html5shiv.

They're the same thing, at the bottom of the github readme:

Remy Sharp on Github posted:

Why is it called a shiv?

The term shiv originates from John Resig, who was thought to have used the word for its slang meaning, a sharp object used as a knife-like weapon, intended for Internet Explorer. Truth be known, John probably intended to use the word shim, which in computing means an application compatibility workaround. Rather than correct his mispelling, most developers familiar with Internet Explorer appreciated the visual imagery. And that, kids, is etymology.

kedo
Nov 27, 2007

DreadCthulhu posted:

Wow, that worked surprisingly well, I didn't even have to modify any CSS to have it look pretty much the same. Thanks a bunch! I think there might be a couple of instances of styling that are a bit odd, but they're not obvious enough that you think it's broken.

Btw, what's the deal with html5shiv vs html5shim? Both projects are up there on google code and both referenced from the github page of html5shiv.

Amusingly enough they cover that on the page. :D

https://code.google.com/p/html5shiv/ posted:

shiv or shim?
Common question: what's the difference between the html5shim and the html5shiv? Answer: nothing, one has an m and one has a v - that's it.

I personally like shiv because :fsn:

e: Also I realize this isn't the right thread but I'm going to sneak this in in an edit b/c I'm not getting poo poo elsewhere: my firm is hiring a kick rear end front-end dev. If you're in or willing to move to the DC area, want the best work environment and don't suck at coding, get in touch with me.

kedo fucked around with this message at 21:56 on Jun 24, 2013

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer

kedo posted:

https://code.google.com/p/html5shiv/

That's pretty much all you need. Certain really complex stuff (like canvas animation) might not work so well, but the shiv will fix the majority of HTML5 fanciness.

Would this potentially work for the problems I am having as well? I am assuming by placing it in the <head> section would be in index.php? Or I guess header.php. This is what I have up there currently unless I did it wrong:

Flaggy fucked around with this message at 22:10 on Jun 24, 2013

kedo
Nov 27, 2007

Flaggy posted:

Would this potentially work for the problems I am having as well? I am assuming by placing it in the <head> section would be in index.php? Or I guess header.php

Probably not, unfortunately. The html5shiv makes IE 8- understand HTML 5 elements like <section> or <article> or whatever. Your problems were Javascript errors, which are probably unrelated.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer

kedo posted:

Probably not, unfortunately. The html5shiv makes IE 8- understand HTML 5 elements like <section> or <article> or whatever. Your problems were Javascript errors, which are probably unrelated.

Ah ok, I replied again before I saw this.

Heskie
Aug 10, 2002

Flaggy posted:

Would this potentially work for the problems I am having as well? I am assuming by placing it in the <head> section would be in index.php?

It could go a long way to help if your theme uses HTML5 elements such as <header>, <aside> etc as IE doesn't support these and gets confused.

Although kedo mentioned there was a bunch of JS issues on IE7, so maybe not. I'd say add it anyway if you're wanting to support IE7/8. I include it on every site I build.

Your best bet is still probably Goons for hire though because debugging IE is usually all about experience, knowing what works and what doesn't after years of painful trial and error. Save yourself the hassle.

MonkeyMaker
May 22, 2006

What's your poison, sir?
nevermind, should make sure there's not another page before i respond.

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!
So I'm having problems getting video to play in Firefox/Safari on Mac only. Chrome is fine for both Win/Mac, but for some reason the video won't play on Safari or Mac FF. It's running on an IIS server, which I am not too familiar with, but the .ogv MIME type is set to "video/ogg" and .mp4 is set to "video/mp4". At first I thought this was just a browser issue so I found a lot of help here http://stackoverflow.com/questions/2643447/html5-video-mp4-and-ogv-problems-in-safari-and-firefox-but-chrome-is-all-goo, but if it was truly a browser issue then the video wouldn't play on Win FF either, not just on Mac. Can anyone give me some direction to go in?

kedo
Nov 27, 2007

enthe0s posted:

So I'm having problems getting video to play in Firefox/Safari on Mac only.

Are you using relative or absolute URLs for your video? There's an old bug in Safari which prevented videos from working if you used a relative URL. Otherwise it sounds like it might be a codec problem.

Can you provide a link?

enthe0s
Oct 24, 2010

In another few hours, the sun will rise!
The site isn't live yet so I can't provide a link, but I think I might have found the issue. Apparently, Win FF uses the mp4 version of the video, while the Mac FF uses the ogv version of the video. I downloaded the ogv and it was really choppy in VLC, so I think it's actually a problem with the video itself.

da keebsta knicca
Sep 12, 2000

Oh Ruutu, you are such a card.
I am confused about how to setup and test a website before launch with SSL certs. Basically I am doing a redevelopment of a website for someone and we are about to launch in the next week. They are scared of the old the old developer so we just want to switch over the domain on launch day to point to the new server without telling them. I am confused about how to buy/setup and test the SSL certificate that will sit on our signup/payment page when I don't have control of the domain yet. I just want everything setup so when the domain name transfer propagates everything is there sitting waiting to go.

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

da keebsta knicca posted:

I am confused about how to setup and test a website before launch with SSL certs. Basically I am doing a redevelopment of a website for someone and we are about to launch in the next week. They are scared of the old the old developer so we just want to switch over the domain on launch day to point to the new server without telling them. I am confused about how to buy/setup and test the SSL certificate that will sit on our signup/payment page when I don't have control of the domain yet. I just want everything setup so when the domain name transfer propagates everything is there sitting waiting to go.

IANAExpert, but could you possibly get the new cert, fake the domain name in your /etc/hosts or hosts file if you're on Windows and then test it locally that way? Don't know what web server you're using, but at least in nginx it's really trivial to just tell it to use a certain private key and certificate for a specific hostname.

Pseudo-God
Mar 13, 2006

I just love oranges!

da keebsta knicca posted:

I am confused about how to setup and test a website before launch with SSL certs. Basically I am doing a redevelopment of a website for someone and we are about to launch in the next week. They are scared of the old the old developer so we just want to switch over the domain on launch day to point to the new server without telling them. I am confused about how to buy/setup and test the SSL certificate that will sit on our signup/payment page when I don't have control of the domain yet. I just want everything setup so when the domain name transfer propagates everything is there sitting waiting to go.
This is not a technical problem, so a technical solution should not be applied. Just tell the old dev to get hosed or something. This calls for a baseball bat, not a week of clandestine coding.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.




I imagine it'll be an unpopular opinion, but poo poo like this just depresses me.

"Hey look: I found a slightly less disgusting way to trick the layout engine into doing something that should and could be perfectly simple and straightforward except that the standards are hosed in the head and several other places I can't mention but my undiagnosed Stockholm Syndrome is preventing me from noticing!"

Instead, you get blog posts about how they were clever CSS lawyers and tricked the system into doing something that shouldn't require trickery in a sane system built to fulfill real-world requirements. I get the desire to crow about how awesome and clever you are, just not the lack of complaining about how much better things could and should be. Or is that all just sort of understood and people try to deal? I'm just constantly surprised at how little people complain about the box model and CSS Vs. how much people complain about a few features of JavaScript that, while terrible, are often avoidable, whereas 'Center thing A inside thing B' is both very common to have to do and surprisingly obtuse to get working unless thing A is a background in which case it's background-position: center. Welp, can't blog about that.

It's probably just that I haven't properly internalized the box model and modern CSS rules yet, but I'm not sure it'd even be all that useful because you still have to invent convoluted workarounds to get common things done and it's usually easier go ahead and google it.

Anyway, I'm not trying to start a derail, so if people want to yell at me lets try to take it elsewhere.

Heskie
Aug 10, 2002

I've been dealing with CSS' inadequacies for so long I forget half of the techniques I use are actually workarounds.

Flexbox layout will solve grid layout and vertical positioning issues. Unfortunately, as IE9 doesn't support it, it could be some time before we get to actually use it.

Nebulon Gate
Feb 23, 2013

Heskie posted:

I've been dealing with CSS' inadequacies for so long I forget half of the techniques I use are actually workarounds.

Flexbox layout will solve grid layout and vertical positioning issues. Unfortunately, as IE9 doesn't support it, it could be some time before we get to actually use it.

http://flexiejs.com/

More and more, I am willing to say "gently caress you IE" and just load up a Polyfill.

Heskie
Aug 10, 2002

Winter is Cuming posted:

http://flexiejs.com/

More and more, I am willing to say "gently caress you IE" and just load up a Polyfill.

I've actually used this in the past, but thought it only supported the old syntax since they've changed it like 3 times?

Would content be rendered horribly while the JS loads? I guess who gives a gently caress if IE usage is low.

Edit: Actually if it's good enough for Mozilla and Compass then it's good enough for me.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Munkeymon posted:

I imagine it'll be an unpopular opinion, but poo poo like this just depresses me.


good stuff

I agree with all of this. The general idea behind CSS is good, but the actual way you do stuff is just obtuse.

Web development involves taking a bunch of sub-optimal parts, mashing them together in the most elegant way possible, and calling it a day.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

I imagine it'll be an unpopular opinion, but poo poo like this just depresses me.


I agree whole-heartedly. The "problem" isn't CSS or browsers, or shivs / polyfills (well, maybe a little) but that somehow "the web" is the one place where designers are allowed to completely ignore the constraints of the format / media, and font end guys are supposed to be wizards; and if they fail, it's *their* fault, not the designer's.

Can't remember if it was in this thread or not where I said this, but if a designer was tasked with delivering art for a billboard, and they produced a square piece with alpha transparency at 150dpi, would the printer be blamed if--after telling the designer this was not viable art to print on a billboard, and being told "just make it work!"--the resulting billboard looked like poo poo and wan't see-through in the right spots?

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
I also like the opposite. As in "why is my site slow?" Oh you decided to add 300 50mb images to the page... And then make them all 50x50. Grr

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
For "Sites don't need to render the same across all browsers", http://dowebsitesneedtolookexactlythesameineverybrowser.com/ is a good URL.
I'm going to guess "Design Principles and Theory" will cover responsive design? Having designers make something FLUID really messes with them when they are used to print. See also:

Lumpy posted:

I agree whole-heartedly. The "problem" isn't CSS or browsers, or shivs / polyfills (well, maybe a little) but that somehow "the web" is the one place where designers are allowed to completely ignore the constraints of the format / media, and font end guys are supposed to be wizards; and if they fail, it's *their* fault, not the designer's.

Can't remember if it was in this thread or not where I said this, but if a designer was tasked with delivering art for a billboard, and they produced a square piece with alpha transparency at 150dpi, would the printer be blamed if--after telling the designer this was not viable art to print on a billboard, and being told "just make it work!"--the resulting billboard looked like poo poo and wan't see-through in the right spots?


But the web is just giant poster you can click on, stop restricting me <:mad:>

I've successfully...educated... the designers here, but now I move on to a new job next week :unsmith:

dereekb
Nov 7, 2010

What do you mean "error"?
I'm currently working on a Google App Engine application and am almost to the point where I'm going to dip into the HTML/JS a lot more than I have currently. So far at this stage I've created a basic amount of CSS and added some JS for handling Google Maps.

After reading the huge amount of info in the op (Thanks for putting that together!), I'm considering using JQuery UI and HTML5 Boilerplate.

Is there anything else to HTML5 Boilerplate other than being a starting place for websites? I opened it up and it looks like only some starting CSS, JS packages, and a few other files.

Is it better to create a website first, and then make sure it is compatible with everything else, or tackle the entire issue to begin with?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
You should be incrementally testing with each and every browser you will support after each "task" is finished,in the development.

Skiant
Mar 10, 2013

dereekb posted:

I'm currently working on a Google App Engine application and am almost to the point where I'm going to dip into the HTML/JS a lot more than I have currently. So far at this stage I've created a basic amount of CSS and added some JS for handling Google Maps.

After reading the huge amount of info in the op (Thanks for putting that together!), I'm considering using JQuery UI and HTML5 Boilerplate.

Is there anything else to HTML5 Boilerplate other than being a starting place for websites? I opened it up and it looks like only some starting CSS, JS packages, and a few other files.

Is it better to create a website first, and then make sure it is compatible with everything else, or tackle the entire issue to begin with?


H5BP is indeed a starting point with a lot of current best paractices bundled in.
If you want something more advanced, you should look at CSS frameworks like Bootstrap, PureCSS and so on. If you are unfamiliar with CSS, starting with those will allow you not to write boilerplate code for colums, forms, tables, and everything else they got covered.

JqueryUI is fine when you need the kind of UI widgets they propose, but if you don't, skip it.

kedo
Nov 27, 2007

Alright, I could us some help with redirects because I'm messing crap up.

I have a bunch of WordPress pages with pretty URLs that need to be redirected. One is the main page, and the rest are sub pages. Their URLs look like this:

code:
example.com/parent-section
example.com/parent-section/foo
however they need to redirect to URLs like this:

code:
newsite.com/parent    (note the lack of -section)
newsite.com/foo


My problem is that easy mode redirects mess things up. Example:

code:
Redirect 301 /parent-section ttp://newsite.com/parent
Redirect 301 /parent-section/foo ttp://newsite.com/foo
This works for /parent-section/, but then /parent-section/foo tries to find newsite.com/parent-section/foo instead of newsite.com/foo

I'm sure regular expressions are needed here, but I'm terrible at them. Any help?

e: Goddamn it, the forum keeps inserting url tags into my code. I removed the "h" from http to prevent that from happening.

kedo fucked around with this message at 21:17 on Jun 27, 2013

Depressing Box
Jun 27, 2010

Half-price sideshow.
Maybe something like this:
Apache code:
Redirect 301  ^/foo/?$   http://newsite.com/foo
Redirect 301  ^/foo/bar  http://newsite.com/bar
The ^ and $ represent the start and end of the url, and force the first rule to only match "oldsite.com/foo" or "oldsite.com/foo/", nothing else.

How many pretty URLs need redirecting? If there are a lot, you'll probably want something more flexible.

EDIT: RedirectMatch may take care of the subpages if the names are the same:
code:
RedirectMatch 301  ^/foo/(.*)$  http://newsite.com/$1

Depressing Box fucked around with this message at 21:34 on Jun 27, 2013

hayden.
Sep 11, 2007

here's a goat on a pig or something
I'm converting a simple app I have to Codeigniter and a MVC structure is all new to me. I'm trying to figure out how to best structure this app.

It's a pretty simple to-do list that uses the nestedSortable jQuery plugin. My PHP queries/prints all the root level items, and whenever it runs into a folder it also prints all of the items within the folder.

My question stems from the contents of the folder needing to be within <ol> tags. Is this how I should approach printing a folder (within a controller)?

$this->load->view('templates/folderStart.php', $item); //has <ol> tag
$this->print_folder_items($whatever);
$this->load->view('templates/folderEnd.php', $item); //has </ol> tag

Just seems kind of messy.

hayden. fucked around with this message at 22:46 on Jun 27, 2013

kedo
Nov 27, 2007

Depressing Box posted:

Maybe something like this:
Apache code:
Redirect 301  ^/foo/?$   [url]http://newsite.com/foo[/url]
Redirect 301  ^/foo/bar  [url]http://newsite.com/bar[/url]
The ^ and $ represent the start and end of the url, and force the first rule to only match "oldsite.com/foo" or "oldsite.com/foo/", nothing else.

How many pretty URLs need redirecting? If there are a lot, you'll probably want something more flexible.

EDIT: RedirectMatch may take care of the subpages if the names are the same:
code:
RedirectMatch 301  ^/foo/(.*)$  [url]http://newsite.com/[/url]$1

Hmmm, this:

Apache code:
Redirect 301  ^/foo/?$   [url]http://newsite.com/foo[/url]
Appears to just plain not work. It continues to pull up oldsite.com/foo, which is weird because everything I'm reading agrees with you.

However this:

code:
RedirectMatch 301  ^/foo/(.*)$  [url]http://newsite.com/[/url]$1
works nicely!

So now I just need to figure out a way to get oldsite.com/foo to redirect to newsite.com/foo-bar without redirecting oldsite.com/foo/baz to newsite.com/foo-bar/baz if that makes sense.

e: again, ignore the url tags. I can't figure out how to avoid them :downs:

kedo fucked around with this message at 23:20 on Jun 27, 2013

Depressing Box
Jun 27, 2010

Half-price sideshow.
Try this:
Apache code:

RedirectMatch 301  ^/foo/?$   [url]http://newsite.com/foo[/url]

kedo
Nov 27, 2007

Depressing Box posted:

Try this:
Apache code:
RedirectMatch 301  ^/foo/?$   [url]http://newsite.com/foo[/url]

You, sir, are awesome. That did the trick. Thanks so much!

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

hayden. posted:

I'm converting a simple app I have to Codeigniter and a MVC structure is all new to me. I'm trying to figure out how to best structure this app.

It's a pretty simple to-do list that uses the nestedSortable jQuery plugin. My PHP queries/prints all the root level items, and whenever it runs into a folder it also prints all of the items within the folder.

My question stems from the contents of the folder needing to be within <ol> tags. Is this how I should approach printing a folder (within a controller)?

$this->load->view('templates/folderStart.php', $item); //has <ol> tag
$this->print_folder_items($whatever);
$this->load->view('templates/folderEnd.php', $item); //has </ol> tag

Just seems kind of messy.

The list should be contained all within one view, which may load subviews but does not necessarily need to. Doing it this way, you risk having to change the logic in the controller if you want to change the structure of the list. You can have as much "complexity" in a view as you feel is necessary for the display of that view, and it's still considered well-designed MVC. You don't necessarily want to break down everything into the smallest possible views, if for no other reason than it will be a massive pain in the rear end when you want to go change something.

Pseudo-God
Mar 13, 2006

I just love oranges!

hayden. posted:

I'm converting a simple app I have to Codeigniter and a MVC structure is all new to me. I'm trying to figure out how to best structure this app.

It's a pretty simple to-do list that uses the nestedSortable jQuery plugin. My PHP queries/prints all the root level items, and whenever it runs into a folder it also prints all of the items within the folder.

My question stems from the contents of the folder needing to be within <ol> tags. Is this how I should approach printing a folder (within a controller)?

$this->load->view('templates/folderStart.php', $item); //has <ol> tag
$this->print_folder_items($whatever);
$this->load->view('templates/folderEnd.php', $item); //has </ol> tag

Just seems kind of messy.
Usually you would handle the printing and the layout in the view. Pass the items to the view, and you can put conditionals, HTML tags and the like in there. Don't fill up your controller with non-business logic.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Pseudo-God posted:

Usually you would handle the printing and the layout in the view. Pass the items to the view, and you can put conditionals, HTML tags and the like in there. Don't fill up your controller with non-business logic.

Exactly. Logic in controller, presentation in view. The controller should never know about the display of the items, just that it is supposed to give a list of them to the view.

Pseudo-God
Mar 13, 2006

I just love oranges!
What I also wanted to mention was that it's OK to put complex code in the view, as long as the presentation of the data is the main goal of the code. For example, putting code like the following is perfectly fine:
php:
<?
if(is_logged_in())
{
    $this->load->view("user_control_panel");
}
else
{
    $this->load->view("login_form");
}
?>
It's also OK to iterate through a variable amount of items, like database entries, but only as long as the data comes from the controller in a PHP container.

Heskie
Aug 10, 2002
Just saw this on Twitter.

Kyle Drake posted:

I want to make another Geocities. Free web hosting, static HTML only, 10MB limit, anonymous, uncensored.

http://neocities.org/blog/making-the-web-fun-again

I like this concept, it gives me warm fuzzy feelings about the 'good old days' of being 12 and building terrible Dragonball Z fansites on Tripod. If it gets more people like Eleanor into building websites then its A Good Thing in my opinion.

Heskie fucked around with this message at 01:08 on Jun 29, 2013

Adbot
ADBOT LOVES YOU

Nebulon Gate
Feb 23, 2013

Heskie posted:

Just saw this on Twitter.


http://neocities.org/blog/making-the-web-fun-again

I like this concept, it gives me warm fuzzy feelings about the 'good old days' of being 12 and building terrible Dragonball Z fansites on Tripod. If it gets more people like Eleanor into building websites then its A Good Thing in my opinion.

Ah, DBZ websites. So many ripped-off pages and so much stolen content claimed as my own. This is all that remains of my first:

http://web.archive.org/web/20041116092014/http://vegetadall.tripod.com/

Made in 2001 I believe.

Anyway, I was weirdly thinking about how the final products of web design are so much more complicated than in the late 90s and early 2000s that it must seem like an insurmountable task to newbies.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply