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
Dietrich
Sep 11, 2001

hayden. posted:

I'm trying to use JavaScript to pull in reddit submissions.

Using this works fine and pulls in the submissions, but it responds as though no one is logged in and uses the default subreddits:

code:
$.getJSON("http://www.reddit.com/hot/.json?jsonp=?", function(data) {
	$.each(data.data.children, function(i,item){
		$('#images').append(item.data.title + '<br><br>');
		//$("<img/>").attr("src", item.data.title).appendTo("#images");
	});
});
If I just point my browser to http://www.reddit.com/hot/.json then it responds but including my default subreddits.

I have almost no idea what I'm doing. Anyone have suggestions in how to make my code above pull in items as though I'm logged in? I've been looking around trying to figure out how to use the reddit API with JavaScript and have found nothing. I would guess logging in through the API first would fix it? No idea.

It probably isn't sending your login cookie along to reddit with that request to get your stuff. You may have to do some other stuff with the API to get an auth token you can send along with the request to get a user's settings respected.

Adbot
ADBOT LOVES YOU

PT6A
Jan 5, 2006

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

Joementum posted:

Web fonts work great if you don't have to worry about anyone with Windows XP ever trying to use your site.

Windows XP is over a decade old at this point and is being EOL'd next year. I'd really rather focus on making my site look great on modern computers instead of making sure it looks equally decent on old computers, unless I have a compelling reason to believe my site's audience will be primarily a bunch of people with old-rear end computers.

MonkeyMaker
May 22, 2006

What's your poison, sir?

PT6A posted:

Windows XP is over a decade old at this point and is being EOL'd next year. I'd really rather focus on making my site look great on modern computers instead of making sure it looks equally decent on old computers, unless I have a compelling reason to believe my site's audience will be primarily a bunch of people with old-rear end computers.

The Internet is "primarily a bunch of people with old-rear end computers."

But I fully agree. If you only build stuff that'll work everywhere, you won't innovate.

Oh My Science
Dec 29, 2008
SEO question.

A local print ship I frequent has asked me about SEO companies and I have no good recommendations. They tossed around the name Annzo Corporation and my initial research shows that they may not be very reputable. Can someone with more experience in this area give me advice? I have made some recommendations after reviewing their website but these are all simple changes like adding proper alt tags, they are interested in more I think.

Skiant
Mar 10, 2013

MonkeyMaker posted:

The Internet is "primarily a bunch of people with old-rear end computers."

But I fully agree. If you only build stuff that'll work everywhere, you won't innovate.

These days, the Internet in industrialized countries is mostly a bunch of people with smartphones/tablets tbh.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

Joementum posted:

Web fonts work great if you don't have to worry about anyone with Windows XP ever trying to use your site.

Those people will hardly notice the Arial/Times New Roman behind their MyDesktopGirl and that purple monkey whose name I forgot and their 12 yahoo toolbars.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
His name is BonzaiBuddy, you dolt.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

MonkeyMaker posted:

The Internet is "primarily a bunch of people with old-rear end computers."

But I fully agree. If you only build stuff that'll work everywhere, you won't innovate.

It will work just fine on windows xp. It just won't look great. A while back we were sending the WEP markup to IE<7 :laugh:

Depending on the job I usually suggest just developing against more or less cutting edge HTML5 poo poo (because it is infinitely better and easier and cheaper) and then doing something extremely barebones for everyone else that would probably work on NCSA Mosaic 2.0.

Incidentally most clients turn out not to care about about those few percentiles. Pretty sure it just isn't worth it unless you are in the alexa top 100 or thereabouts.

Modern web dev is just inconceivably better and faster than the bad old days.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

Suspicious Dish posted:

His name is BonzaiBuddy, you dolt.

Ahh memories.

Munkeymon
Aug 14, 2003

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



Oh My Science posted:

SEO question.

A local print ship I frequent has asked me about SEO companies and I have no good recommendations. They tossed around the name Annzo Corporation and my initial research shows that they may not be very reputable. Can someone with more experience in this area give me advice? I have made some recommendations after reviewing their website but these are all simple changes like adding proper alt tags, they are interested in more I think.

A company I used to work for paid for SEOMoz: http://moz.com/ It wasn't terrible in that it found some stupid things I had done with our custom URL routing script that I never imagined a user/robot would do, so that was neat. Mostly I assume SEO is snake oil unless it comes straight from Google's recommendations because I've never had meaningful contact with an SEO consultant/specialist/guru/evangelist/ohgodwhatthefuckeverkillyourself that didn't convince me that they knew anything more than some buzzwords and how to cash checks. I swear I'm willing to be convinced otherwise, but outside of intentional, flagrant Google bombing and not being a moron about site structure, I don't think there's really as much to it as some people want everyone else to believe.

Oh My Science
Dec 29, 2008

Munkeymon posted:

... I don't think there's really as much to it as some people want everyone else to believe.

So it turns out they were asking if they should renew their contract with Annzo for $300 a month... yeah.

After reviewing their site the HTML structure is a mess, they are missing essential tags, and the only optimization I can see are the meta tags. Oh, and the reason they asked is because an Annzo rep called while I was in the store trying to get them to sign up for another 6 months.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Suspicious Dish posted:

This site hurts my eyes. Also, the links are invisible.

Please don't treat the internet like a book, even if you really, really want to.

Legible text hurts your eyes? Can you give some examples as to why you disagree, or are you just going to be your normal, dismissive self and not actually provide anyone the benefit of your knowledge? "That sucks" isn't a very helpful critique.

tarepanda
Mar 26, 2011

Living the Dream

hayden. posted:

If I just point my browser to http://www.reddit.com/hot/.json then it responds but including my default subreddits.

That's because you're logged in on your account.

hayden. posted:

When my code above runs (it's on a remote server, not my local machine) does it request it through the server it's hosted on or through my own connection?

There's no way something run on a remote server would use your connection.

hayden. posted:

I have almost no idea what I'm doing. Anyone have suggestions in how to make my code above pull in items as though I'm logged in? I've been looking around trying to figure out how to use the reddit API with JavaScript and have found nothing. I would guess logging in through the API first would fix it? No idea.

Yes, if you want it to pull items as though it's logged in as you, it will have to be logged in as you.

kedo
Nov 27, 2007

Oh My Science posted:

So it turns out they were asking if they should renew their contract with Annzo for $300 a month... yeah.

After reviewing their site the HTML structure is a mess, they are missing essential tags, and the only optimization I can see are the meta tags. Oh, and the reason they asked is because an Annzo rep called while I was in the store trying to get them to sign up for another 6 months.

Ask them how they found Annzo. :10bux: says they contacted your client out of the blue saying things like, "Did you know your Google site ranks lowly in Bing results?" The number of times I've had to refute these emails to clients, it pains me.

If your client is serious about SEO, you want a SEO firm that has more of a marketing/copywriting/adwords management angle imo. The optimization of tags isn't the entire picture, but a lot of crappy tech-heavy firms just stick to that + installing often superfluous and expensive analytics packages.

Wish I knew one, but I don't. If you find someone good, share it?

e: Not to say all analytics packages are superfluous.

kedo fucked around with this message at 00:55 on Jul 27, 2013

hayden.
Sep 11, 2007

here's a goat on a pig or something

tarepanda posted:

There's no way something run on a remote server would use your connection.

JavaScript running in a browser after a page has loaded isn't running on the remote server is it?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Lumpy posted:

Legible text hurts your eyes? Can you give some examples as to why you disagree, or are you just going to be your normal, dismissive self and not actually provide anyone the benefit of your knowledge? "That sucks" isn't a very helpful critique.

http://practicaltypography.com/summary-of-key-rules.html

#000000 on #FFFFFF is hard to read. Making it #333333 on #ECE6E6 would be better.

Try and identify where the hyperlinks are. They're not underlined. I haven't found any consistent pattern about where they'll appear.

The weight is also fairly inconsistent between the numbers on the left and the prose on the right. The SOMETIMES WE'RE GOING TO USE CAPS also seems more heavy than the text around it and is distracting.

By removing the style entirely, I can actually read the prose a lot easier.

tarepanda
Mar 26, 2011

Living the Dream

hayden. posted:

JavaScript running in a browser after a page has loaded isn't running on the remote server is it?

I was confused since you said it was running on the remote server. It's just stored there and running on your computer?

I'm guessing that hot/.json doesn't do anything other than grab the public "hot" list. I've never used the Reddit API -- you'll have to look and see how to log in and use the logged in session.

Oh My Science
Dec 29, 2008

kedo posted:

Ask them how they found Annzo. :10bux: says they contacted your client out of the blue saying things like, "Did you know your Google site ranks lowly in Bing results?"

Nailed it.

Skiant
Mar 10, 2013

Suspicious Dish posted:

http://practicaltypography.com/summary-of-key-rules.html

#000000 on #FFFFFF is hard to read. Making it #333333 on #ECE6E6 would be better.

Try and identify where the hyperlinks are. They're not underlined. I haven't found any consistent pattern about where they'll appear.

The weight is also fairly inconsistent between the numbers on the left and the prose on the right. The SOMETIMES WE'RE GOING TO USE CAPS also seems more heavy than the text around it and is distracting.

By removing the style entirely, I can actually read the prose a lot easier.

You do realize the all-caps is the consistent pattern you tried so hard to find for the links, right?
You might also want to check your screen contrast/lightning settings if black on white burns your eyes that much.

YO MAMA HEAD
Sep 11, 2007

It also uses lozenges for more subtle inline links, which is sort of strange but immediately obvious.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Skiant posted:

You do realize the all-caps is the consistent pattern you tried so hard to find for the links, right?

I thought that, but I swore there were some all-caps on some page that weren't linked. That's a really, really bad way to do links, just pointing that out.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Either way, it's a rather peculiar choice to, in a book about practical application of typographic conventions, decide to throw away the two primary conventions for recognising inline links, colour and underline.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Maluco Marinero posted:

Either way, it's a rather peculiar choice to, in a book about practical application of typographic conventions, decide to throw away the two primary conventions for recognising inline links, colour and underline.

Yes, bad choice on his link style for sure. A vast majority of the info is quite good through. Some day somebody will write something perfect and display it on a web page perfectly. Today is not that day...

pipes!
Jul 10, 2001
Nap Ghost
Good looking type on a printed page is a problem that's been solved over the course of ~550 years. A lot of it's best practices can transfer to the web, but not everything. Fonts on the web is a technology in its infancy (and very exciting times if you're into that sort of thing), but learning the basics, like a lot of what is presented on that site, can only serve to make your content easier to read (and therefore make your site a more enjoyable experience). A lot of it also transcends today's technological trend, in that a setting good line length will pretty much always be useful, regardless if the width is set in picas, ems, pixels, rems (see what I did there?), etc.

Also: Mailchimp owns.

Thermopyle
Jul 1, 2003

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

Bootstrap 3 RC1 is out.

quote:

While our last major version bump (2.0) was a complete rewrite of the docs, CSS, and JavaScript, the move to 3.0 is equally ambitious, but for a different reason: Bootstrap 3 will be mobile-first.

The single biggest change is that there are no longer separate fluid/responsive/fixed stuff. Just one type of grid/css.

Rest of changes here.

Thermopyle fucked around with this message at 20:33 on Jul 29, 2013

Oh My Science
Dec 29, 2008

Thermopyle posted:

Bootstrap 3 RC1 is out.

I just noticed this as well, I'm sad that they still use LESS. drat those js users.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

So uh, anyone just dropped in RC3 on a live project to see how much is broken yet?

Oh My Science
Dec 29, 2008

Scaramouche posted:

So uh, anyone just dropped in RC3 on a live project to see how much is broken yet?

Assuming you're talking about Bootstrap 3 RC1 it's not possible. The grid has changed completely.

Sub Par
Jul 18, 2001


Dinosaur Gum
I'm using jquery-ui for a sortable horizontal list. The list will contain a dynamic number of items and I've set things up so that 4 items fit comfortably. In the event that a 5th+ item is in the list, I don't want it to wrap down, I want it to keep going horizontally with scrollbars appearing. I can't seem to figure out what to Google for to get an answer for how to do this. I've cooked up this jsFiddle that demonstrates what I've got. I'm sure it's simple and there's something dumb I just don't know, but if you could help me out that would be great. Thanks.

tarepanda
Mar 26, 2011

Living the Dream
Add overflow-x: scroll; overflow-y: hidden; to your sortable div.

Sub Par
Jul 18, 2001


Dinosaur Gum

tarepanda posted:

Add overflow-x: scroll; overflow-y: hidden; to your sortable div.

Thanks. I tried that, but it doesn't seem to work: http://jsfiddle.net/3bA3C/

tarepanda
Mar 26, 2011

Living the Dream
http://jsfiddle.net/QA5b6/

If you have multiple divs with IDs with the exact same style, odds are that they should be a class.

Edit: Why are you making a navigation bar sortable, anyway? Just curious...

Sub Par
Jul 18, 2001


Dinosaur Gum

tarepanda posted:

http://jsfiddle.net/QA5b6/

If you have multiple divs with IDs with the exact same style, odds are that they should be a class.

Edit: Why are you making a navigation bar sortable, anyway? Just curious...

So this doesn't seem to work either. If you change the width of the sortable div to say 200, it will continue to wrap the items. The code I had here was just from playing around with someone else's fiddle - I didn't want to paste my code in directly because I'd have to scrape out a bunch of rails crap. I'm not making a navigation bar sortable, that's just the labels that were already in here.

I'm trying to make a UI that is similar to Hootsuite if you've ever used it. There are X number (variable by user) of lists that have a similar structure but are different types of lists, and I want to display each list side by side and allow the user to re-order them by dragging and dropping them to the left or to the right.

tarepanda
Mar 26, 2011

Living the Dream
Never seen it.

Dumb mistake on my part though: http://jsfiddle.net/K47Cg/

The sortable has to have a fixed width and the containing div is the one that does the overflowing.

Sub Par
Jul 18, 2001


Dinosaur Gum

tarepanda posted:

Never seen it.

Dumb mistake on my part though: http://jsfiddle.net/K47Cg/

The sortable has to have a fixed width and the containing div is the one that does the overflowing.

Bless you, this is great. Thanks!

Social Animal
Nov 1, 2005

Has anyone developed with Golang yet? Is its concurrency model going to be a game changer?

Munkeymon
Aug 14, 2003

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



I haven't used it yet but there's a Go thread: http://forums.somethingawful.com/showthread.php?threadid=3473284

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer
Dumb question time, is there a way to forward multiple olds links to a new one?

Example:

(old) info.example.com/example-blah-blah-blah

We have about 100 of those out there in the wild searches, but we needed them forwarded to just 1 domain. I updated the A (Host) to point to the root of the domain. But when I click on the link in a google search I get a 404 error page. Is there a way to redirect all these without setting up each one that I come across?

kedo
Nov 27, 2007

Flaggy posted:

Dumb question time, is there a way to forward multiple olds links to a new one?

Example:

(old) info.example.com/example-blah-blah-blah

We have about 100 of those out there in the wild searches, but we needed them forwarded to just 1 domain. I updated the A (Host) to point to the root of the domain. But when I click on the link in a google search I get a 404 error page. Is there a way to redirect all these without setting up each one that I come across?

.htaccess redirects on the old domain would do the trick.

pre:
RedirectMatch 301 ^/(.*)$  http://newsite.com/$1
Should redirect all requests to newsite.com/request

Adbot
ADBOT LOVES YOU

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer

kedo posted:

.htaccess redirects on the old domain would do the trick.

pre:
RedirectMatch 301 ^/(.*)$  http://newsite.com/$1
Should redirect all requests to newsite.com/request

Wouldn't I have to put the old site in there ala:
code:
Options +FollowSymlinks 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ [url]http://newdomain.com/[/url]$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^[url]www.olddomain.com[/url] [NC]
RewriteRule ^(.*)$ [url]http://newdomain.com/[/url]$1 [L,R=301]

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