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
The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

Winter is Cuming posted:

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.

I read about this thing on hackernews earlier and the dude running it seems pretty committed to the idea of keeping stuff friendly. I have fond memories of teaching little dudes and dudettes how to make their very first static HTML sites a while back, and I remember even then thinking that the part that really sucked was that all these kids were going to have to figure out how to get and upload files to hosting so it is cool that this exists now and I hope it keeps going/takes off.

Additionally, I'm so glad I now have control over this very obviously :nws: domain -- http://titties.neocities.org/

Adbot
ADBOT LOVES YOU

substitute
Aug 30, 2003

you for my mum
Saw the neocities link posted and immediately signed up. Not sure what I'll do with it, but I know everything I upload will be built exclusively using table layouts.


<table width="750" border="1" cellpadding="5" cellspacing="0">
<tr><td colspan="2">WELCOME TO THE WORLD WIDE WEB</td></tr>
<tr><td>Oh...</td><td>:hellyeah:</td></tr>
</table>

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
I have a small issue with a new portfolio site I am making in wordpress. It looks fine (ish) but when I look on my phone the sidebar with its position: fixed; left: 0; makes it overlay the content. How can I make it change for the mobile only? Here is the site in question https://www.reidbuck.me

kedo
Nov 27, 2007

thegasman2000 posted:

I have a small issue with a new portfolio site I am making in wordpress. It looks fine (ish) but when I look on my phone the sidebar with its position: fixed; left: 0; makes it overlay the content. How can I make it change for the mobile only? Here is the site in question https://www.reidbuck.me

Media queries are your friend!

CSS code:
@media only screen and (max-width: 568px) {
    /* Mobile specific CSS */
}
That will target most mobile devices. Well, technically speaking it's really only targeting by browser size, not device.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Wow that's easy thanks! :)

Oh My Science
Dec 29, 2008

thegasman2000 posted:

I have a small issue with a new portfolio site I am making in wordpress. It looks fine (ish) but when I look on my phone the sidebar with its position: fixed; left: 0; makes it overlay the content. How can I make it change for the mobile only? Here is the site in question https://www.reidbuck.me

You may want to take a quick peek at foundation or bootstrap, they solve a lot of the issues you may run into when designing for mobile devices. I always recommend understanding what they do for you, so look at them as a learning tool.

Screen caps from an iPad:





You can scroll left - right causing the menu to overlap the content.

Oh My Science fucked around with this message at 21:55 on Jul 1, 2013

o.m. 94
Nov 23, 2009

So, I've had a toy idea for a Twitter account that I want to generate tweets and send them out on a (non-annoyingly) consistent basis, but I'm wrestling with the best way to do a high-level implementation.

I have a server sitting around I want to put to use, and my thought is to write something in PHP that will generate the tweet string, then make a POST request to the Twitter API. Presumably I'll need the PHP OAuth extension to integrate the account I need (as per v1.1 of the API) as well.

However, if I do it in PHP, I'll either have to make the request manually or set up a cron job. The other alternative is to write a Python script that would maintain an uptime and make the same RESTful requests as above.

Does this sound reasonable, or am I way off here?

Pseudo-God
Mar 13, 2006

I just love oranges!

oiseaux morts 1994 posted:

So, I've had a toy idea for a Twitter account that I want to generate tweets and send them out on a (non-annoyingly) consistent basis, but I'm wrestling with the best way to do a high-level implementation.

I have a server sitting around I want to put to use, and my thought is to write something in PHP that will generate the tweet string, then make a POST request to the Twitter API. Presumably I'll need the PHP OAuth extension to integrate the account I need (as per v1.1 of the API) as well.

However, if I do it in PHP, I'll either have to make the request manually or set up a cron job. The other alternative is to write a Python script that would maintain an uptime and make the same RESTful requests as above.

Does this sound reasonable, or am I way off here?
Yeah, your implementation idea is fine. I am not sure how the authentication will work (as I have not worked with the twitter API), but the rest of your implementation is perfectly adequate.

YO MAMA HEAD
Sep 11, 2007

oiseaux morts 1994 posted:

So, I've had a toy idea for a Twitter account that I want to generate tweets and send them out on a (non-annoyingly) consistent basis, but I'm wrestling with the best way to do a high-level implementation.

I have a server sitting around I want to put to use, and my thought is to write something in PHP that will generate the tweet string, then make a POST request to the Twitter API. Presumably I'll need the PHP OAuth extension to integrate the account I need (as per v1.1 of the API) as well.

However, if I do it in PHP, I'll either have to make the request manually or set up a cron job. The other alternative is to write a Python script that would maintain an uptime and make the same RESTful requests as above.

Does this sound reasonable, or am I way off here?


My first PHP project was a cron'd bot that made OAuth tweets, but something broke a few weeks ago... it worked fine while it lasted, though. http://twitter.com/dogsmcgee

o.m. 94
Nov 23, 2009

YO MAMA HEAD posted:

My first PHP project was a cron'd bot that made OAuth tweets, but something broke a few weeks ago... it worked fine while it lasted, though. http://twitter.com/dogsmcgee

Was it the Twitter API change? It finally kicked in for a lot of our client's sites a week or so ago, and those who failed to heed our warnings last year were left with a bunch of empty site feeds.

kedo
Nov 27, 2007

YO MAMA HEAD posted:

My first PHP project was a cron'd bot that made OAuth tweets, but something broke a few weeks ago... it worked fine while it lasted, though. http://twitter.com/dogsmcgee

Yeah, it was surely the 1.1 API change that broke it. It broke everything Twitter related on a whole slew of sites the internet over, which was amusing. I especially enjoyed the big support thread on the Twitter developer forums with all of the "what, you broke this service you offer for free?! YOU'RE LOSING A CUSTOMER!" replies from idiots.

This could give you a good start on the OAuth portion. Ignore everything else in that repo as it's for getting, not posting tweets.

kedo fucked around with this message at 15:04 on Jul 2, 2013

stoops
Jun 11, 2001
I would like to get into HTML5 a bit, focusing more on canvas, and being able to draw spectrograms.

At my work, my colleagues use c++ and other programs to draw spectrograms, but, with me being the "web guy", I want to be able to port this onto the web.

Is this at all possible right now?

I googled spectrograms and html5 and i saw that a web audio api can do that, sorta, but with wav files.

If anyone can recommend me some solid books, even if it's just basic canvas drawings for now, I'd appreciate.

Dietrich
Sep 11, 2001

stoops posted:

I would like to get into HTML5 a bit, focusing more on canvas, and being able to draw spectrograms.

At my work, my colleagues use c++ and other programs to draw spectrograms, but, with me being the "web guy", I want to be able to port this onto the web.

Is this at all possible right now?

I googled spectrograms and html5 and i saw that a web audio api can do that, sorta, but with wav files.

If anyone can recommend me some solid books, even if it's just basic canvas drawings for now, I'd appreciate.

It's more than possible, but I would recommend using a charting/graphing library until you get your feet under you. Trying to make one from scratch will be many hours of investment to solve a solved problem.

Here are quite a few: http://www.unheap.com/?s=graph

I use flot. It's nice.

kedo
Nov 27, 2007

I've seen d3.js used on some interesting canvas projects as well, though I haven't used it myself.

Dietrich
Sep 11, 2001

kedo posted:

I've seen d3.js used on some interesting canvas projects as well, though I haven't used it myself.

That is badass.

Sereri
Sep 30, 2008

awwwrigami

I'm currently rewriting how Awful (for Android) creates the HTML of the parsed forum threads and since it's gonna rely a lot more on CSS this time I'm looking for web-developers to tell me that my HTML/CSS/JS is bad, my choices in layout/styling are bad and how to improve them.

If you want to help please send me a PM. Having access to an Android phone is not really necessary since it's all HTML though I guess it might help.

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



EDIT: this is the entirely wrong thread

Vintersorg fucked around with this message at 22:20 on Jul 3, 2013

Ghostlight
Sep 25, 2009

maybe for one second you can pause; try to step into another person's perspective, and understand that a watermelon is cursing me



I'm doing a site redesign and have been passed a mockup from our (non-web) graphic designer that has a portfolio display in a three column grid, with the images of some projects in the portfolio spanning two columns - it looks nice, but the main feature we're redesigning for is being able to filter through projects by several different criteria and I have no idea how to even begin implementing that sort of design while having the list be able to resort itself arbitrarily so that there aren't blank squares, either dynamically or through forcibly refreshing the page.

It strikes me as a really nice visual element someone else might have solved though. Does anybody have any ideas?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Ghostlight posted:

I'm doing a site redesign and have been passed a mockup from our (non-web) graphic designer that has a portfolio display in a three column grid, with the images of some projects in the portfolio spanning two columns - it looks nice, but the main feature we're redesigning for is being able to filter through projects by several different criteria and I have no idea how to even begin implementing that sort of design while having the list be able to resort itself arbitrarily so that there aren't blank squares, either dynamically or through forcibly refreshing the page.

It strikes me as a really nice visual element someone else might have solved though. Does anybody have any ideas?

You are describing what is known as the "Masonry" layout.

https://www.google.com/search?q=masonry+layout

Good news: many many people have solved this problem for you.


\/\/ many of the example sites right on the page show variable width content, such as: http://thereason.us/

Lumpy fucked around with this message at 01:45 on Jul 4, 2013

kedo
Nov 27, 2007

Lumpy posted:

You are describing what is known as the "Masonry" layout.

https://www.google.com/search?q=masonry+layout

Good news: many many people have solved this problem for you.

I was thinking the same thing and was going to suggest jQuery Masonry until I saw he needed to span two columns. I'm not aware of a masonry plugin that is capable of that by default...?

Oh My Science
Dec 29, 2008

Ghostlight posted:

It strikes me as a really nice visual element someone else might have solved though. Does anybody have any ideas?

Check out http://mixitup.io/

specifically this demo http://mixitup.io/demos/template

Oh My Science fucked around with this message at 01:54 on Jul 4, 2013

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Any general advice, guidelines or guides for how to make your web api not suck over long stretches of time? The web app portion is easy, I can change that whenever and users will get the latest .js files in no time, but the mobile apps might lag behind by weeks if not months, depending on how aggressive the specific OS is about forcing updates (iOS really isn't at this point, not until iOS7).

So how do I start developing APIs that service multiple versions of clients with a 1-2 month margin of backwards compatibility? Test the API with oldest supported client version and newest version at all times, make sure it works? I know I'll figure it out through mistakes, but ideally I'd not not learn it the hard way.

kedo
Nov 27, 2007

I'm working on a website for a business with multiple locations. Mobile users are huge for them, so I'm thinking about making a "find the nearest location" button, but am unsure where exactly to begin. Getting the user's location seems to be pretty simple, but I'm wondering how to go about accomplishing the find function.

Google Maps seems like an obvious choice? Does anyone have a good tutorial or something they could share?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

DreadCthulhu posted:

Any general advice, guidelines or guides for how to make your web api not suck over long stretches of time? The web app portion is easy, I can change that whenever and users will get the latest .js files in no time, but the mobile apps might lag behind by weeks if not months, depending on how aggressive the specific OS is about forcing updates (iOS really isn't at this point, not until iOS7).

So how do I start developing APIs that service multiple versions of clients with a 1-2 month margin of backwards compatibility? Test the API with oldest supported client version and newest version at all times, make sure it works? I know I'll figure it out through mistakes, but ideally I'd not not learn it the hard way.

Just check if the app's version is the latest one, and put a pretty dialog asking the user to update if it is not.

Oh My Science
Dec 29, 2008

DreadCthulhu posted:

Any general advice, guidelines or guides for how to make your web api not suck over long stretches of time?

Not specific advice, but the Ruby Rogues talked about API's in one of their podcast's. May be worth a listen if you're looking for general resources.

http://rubyrogues.com/073-rr-apis/

Oh My Science
Dec 29, 2008

kedo posted:

Google Maps seems like an obvious choice? Does anyone have a good tutorial or something they could share?

The Google API docs are fairly decent, unless you're looking for framework specific tutorials. They provide code samples for every feature in V3 of the API.

https://developers.google.com/maps/documentation/javascript/

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Is there any kind of unwritten convention for giving dns names to websites / api when testing them on a local machine? For example, would you call api.mycompany.com something like api.localhost.com and then update the hosts file?

Depressing Box
Jun 27, 2010

Half-price sideshow.
I don't know if it's a standard, but I've seen (and personally use) names ending in .dev, so api.mysite.com becomes api.mysite.dev. Especially useful when you're testing multiple sites at once, or if the site responds to more than one domain.

EDIT:

kedo posted:

I'm working on a website for a business with multiple locations. Mobile users are huge for them, so I'm thinking about making a "find the nearest location" button, but am unsure where exactly to begin. Getting the user's location seems to be pretty simple, but I'm wondering how to go about accomplishing the find function.

Google Maps seems like an obvious choice? Does anyone have a good tutorial or something they could share?

Geocoding is probably the other half of what you're trying to do. These might help if you're using PHP:

  • Geocoder - To convert addresses/IPs/etc. to coordinates and vice versa.
  • phpgeo - For comparing distances between coordinates.

I'd say geocode the business' locations and store them somewhere, then get the user's coordinates from the geolocation API or a geocoded address and compare them. Also, here's a handy way to compare a user's coordinates to a database directly in MySQL.

Depressing Box fucked around with this message at 02:02 on Jul 7, 2013

kedo
Nov 27, 2007

Depressing Box posted:

I don't know if it's a standard, but I've seen (and personally use) names ending in .dev, so api.mysite.com becomes api.mysite.dev. Especially useful when you're testing multiple sites at once, or if the site responds to more than one domain.

EDIT:


Geocoding is probably the other half of what you're trying to do. These might help if you're using PHP:

  • Geocoder - To convert addresses/IPs/etc. to coordinates and vice versa.
  • phpgeo - For comparing distances between coordinates.

I'd say geocode the business' locations and store them somewhere, then get the user's coordinates from the geolocation API or a geocoded address and compare them. Also, here's a handy way to compare a user's coordinates to a database directly in MySQL.

phpgeo sounds like exactly what I'm looking for. This place isn't going to open new locations so often that it needs to be super complex... so I think finding the user's coordinates via .getCurrentPosition() and then finding the closest location with a phpgeo call would accomplish what I need.

Thanks much!

e: lol that's pretty much exactly what you said in your last paragraph, but I got lost in the phpgeo repo and didn't read it. :downs:

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Is it really CORS to make a call from foo.example.com to bar.example.com? For some reason I always assumed that sharing second level domains would guarantee it's wouldn't be cross origin.

The Insect Court
Nov 22, 2012

by FactsAreUseless

DreadCthulhu posted:

Is it really CORS to make a call from foo.example.com to bar.example.com? For some reason I always assumed that sharing second level domains would guarantee it's wouldn't be cross origin.

Yes, foo.site.com is a different domain from bar.site.com. DNS is hierarchical and doesn't distinguish in any fundamental way between the second subdomain and the fiftieth, It's just that all the subdomains of site.com are usually in the same DNS zones.

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

The Insect Court posted:

Yes, foo.site.com is a different domain from bar.site.com. DNS is hierarchical and doesn't distinguish in any fundamental way between the second subdomain and the fiftieth, It's just that all the subdomains of site.com are usually in the same DNS zones.

So just * Access-Control-Allow-Origin and be done with it?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I asked this in the recommend me a tablet thread a while ago and wanted to ask here as well:
Tablets (iOS, preferably Android) still aren't suited for web development are they?

PT6A
Jan 5, 2006

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

The Merkinman posted:

I asked this in the recommend me a tablet thread a while ago and wanted to ask here as well:
Tablets (iOS, preferably Android) still aren't suited for web development are they?

If you're comfortable with developing in a basic SSH terminal, it's possible but extremely unpleasant, until you need to gently caress with images in a non-trivial way. If you have an external keyboard, it might be slightly less unpleasant, but I still wouldn't recommend it.

Oh My Science
Dec 29, 2008

The Merkinman posted:

I asked this in the recommend me a tablet thread a while ago and wanted to ask here as well:
Tablets (iOS, preferably Android) still aren't suited for web development are they?

No, get a MacBook Air, maybe a Chrome Book if you can live with the Chrome OS.

Oh My Science
Dec 29, 2008
Has anyone used Zepto.js in production? I'm hesitant because it doesn't support anything older than IE10 but I could provide a fall back to jquery like they suggest.

Nebulon Gate
Feb 23, 2013

Oh My Science posted:

Has anyone used Zepto.js in production? I'm hesitant because it doesn't support anything older than IE10 but I could provide a fall back to jquery like they suggest.

It's basically exactly like jQuery, but faster, and more suited to mobile platforms. I recommend it, and just provide the fallback, as said.

PT6A
Jan 5, 2006

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

Oh My Science posted:

No, get a MacBook Air, maybe a Chrome Book if you can live with the Chrome OS.

Or a Windows ultrabook (mind you, I bought mine before the abortion that is Windows 8).

kedo
Nov 27, 2007

The Merkinman posted:

I asked this in the recommend me a tablet thread a while ago and wanted to ask here as well:
Tablets (iOS, preferably Android) still aren't suited for web development are they?

What everyone else said. But if you ever do need to do a little bit of work on a tablet, Diet Coda isn't terrible. It's not quite as robust and customizable as a desktop app, but it works in a pinch. However it is in no way a viable alternative to a real computer as your main development platform.

Speaking of developing on a mobile device... is there such a thing as developer tools in Safari on iOS (or any app, for that matter)? I think the answer is no, but man it makes testing a pain in the rear end when you can't see the code running a bugged element. I once found a little javascript bookmarklet that would let you view source, but it was pretty unreliable.

Adbot
ADBOT LOVES YOU

Depressing Box
Jun 27, 2010

Half-price sideshow.

kedo posted:

Speaking of developing on a mobile device... is there such a thing as developer tools in Safari on iOS (or any app, for that matter)? I think the answer is no, but man it makes testing a pain in the rear end when you can't see the code running a bugged element. I once found a little javascript bookmarklet that would let you view source, but it was pretty unreliable.

It looks like Safari has remote Web Inspector support as of iOS 6.

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