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
Skiant
Mar 10, 2013

Bodhi Tea posted:

What's the best place to post some javascript and get a critique of my code?
I'm trying to get better and desperately need a code review.

There's a Javascript thread. Also a Modern front-end dev thread in case your question relates to Backbone/Ember/Angular/React/etc.

Adbot
ADBOT LOVES YOU

my bony fealty
Oct 1, 2008

Can anyone comment on this book, Professional Javascript for Web Developers as a tool for learning JS properly? I'm moderately comfortable with JS, but have learned through bits and pieces and random tutorials here and there, never through one resource. As a result I feel that I'm lacking a lot of fundamentals/having gaps.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

hooah posted:

project in class [..] the only one in the group who had any amount of web development experience [is] Project Manager [..] I don't have time (or really the will) to really learn HTML/CSS/whatever else, I'd like to use a WYSIWYG editor. I need to have the ability to host it on the school's server [..] I need to be able to password-protect some portions of the website.

I don't want to be "that guy", but have you considered doing it in Wordpress? Fully functioning WYSIWYG CMS, themes out the wazoo, you can password protect pages (there's probably a better way, that was the first google result) and we have a whole thread dedicated to Wordpress.

Why is this a good idea?
  • Don't re-invent the wheel. If you want a CMS, wordpress was basically designed to do that.
  • Learning curve. Wordpress is aimed at beginner-level, but can be made to do crazy expert-level stuff, too. This makes it brilliantly customisable.
  • If you use a good theme, you don't need to do much (if any) HTML/CSS work.
  • If your professor can't figure out how to deploy a Wordpress site, they probably shouldn't be teaching that class.

Skiant
Mar 10, 2013

my bony fealty posted:

Can anyone comment on this book, Professional Javascript for Web Developers as a tool for learning JS properly? I'm moderately comfortable with JS, but have learned through bits and pieces and random tutorials here and there, never through one resource. As a result I feel that I'm lacking a lot of fundamentals/having gaps.

Two books helped me a lot progressing from "I know how to do jQuery stuff" to "I can read the source of most JS libs and get what they're doing": Javascript - The Good Parts and Secrets of a Javascript Ninja.

Alternatively, you can also find Javascript Allonge for free over the Internet and it's a good read as well.

hooah
Feb 6, 2006
WTF?

v1nce posted:

I don't want to be "that guy", but have you considered doing it in Wordpress? Fully functioning WYSIWYG CMS, themes out the wazoo, you can password protect pages (there's probably a better way, that was the first google result) and we have a whole thread dedicated to Wordpress.

Why is this a good idea?
  • Don't re-invent the wheel. If you want a CMS, wordpress was basically designed to do that.
  • Learning curve. Wordpress is aimed at beginner-level, but can be made to do crazy expert-level stuff, too. This makes it brilliantly customisable.
  • If you use a good theme, you don't need to do much (if any) HTML/CSS work.
  • If your professor can't figure out how to deploy a Wordpress site, they probably shouldn't be teaching that class.

Is there a way to build the site with Wordpress, then host it on my school's server without paying the $13 mapping fee?

EAT THE EGGS RICOLA
May 29, 2008

hooah posted:

Is there a way to build the site with Wordpress, then host it on my school's server without paying the $13 mapping fee?

You can roll a digital ocean server for $5/month, or sign up for the github student dev pack to get $100 free credit + a ton of other stuff.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

Skiant posted:

Two books helped me a lot progressing from "I know how to do jQuery stuff" to "I can read the source of most JS libs and get what they're doing": Javascript - The Good Parts and Secrets of a Javascript Ninja.

Alternatively, you can also find Javascript Allonge for free over the Internet and it's a good read as well.

Another free one is http://eloquentjavascript.net/ which had its new edition crowdfunded.

There's also this MOOC which is free unless you want the certificate: https://www.udacity.com/course/ud015

And personally this book cleared out some of the stuff I didn't quite get in JS: http://www.amazon.com/Principles-Object-Oriented-JavaScript-Nicholas-Zakas/dp/1593275404

my bony fealty
Oct 1, 2008

hooah posted:

Is there a way to build the site with Wordpress, then host it on my school's server without paying the $13 mapping fee?

You can install Wordpress anywhere pretty easily -

http://codex.wordpress.org/Installing_WordPress

and access the Dashboard from your server.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
/\/\/\ Curse you people

Yeah, download the source and run it on a local webserver. Here's a (dated) youtube tutorial.

You should be up and running with a "it works!" situation inside ~ half an hour. You can then theme it and start adding content thereafter.

Wordpress can be run on any webserver that supports PHP and usually using MySQL for the database. Like I said, anyone with bare-minimum server-based website development experience should be able to setup wordpress. Even in academia ;)

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

hooah posted:

I just got put in a group for a project in class. Amazingly, the professor assigned the only one in the group who had any amount of web development experience the role of Project Manager, so she can't do the web stuff (although she's willing to help me), so I'm doing that part of the project. Since I don't have time (or really the will) to really learn HTML/CSS/whatever else, I'd like to use a WYSIWYG editor. I need to have the ability to host it on the school's server, as opposed to some company's, and I need to be able to password-protect some portions of the website. My wife had used weebly to make a website for her elementary classroom, but it turns out you can't password-protect any of the site without springing for the pro account. What other sites/tools should I be looking at?

I'm confused about what kind of class this is. If it's a web dev/IT/CS class, why isn't the teacher giving you any guidance whatsoever about how to create or host the site?

fuf
Sep 12, 2004

haha
If I want to try Sublime Text should I go with 2 or 3?

hooah
Feb 6, 2006
WTF?

caiman posted:

I'm confused about what kind of class this is. If it's a web dev/IT/CS class, why isn't the teacher giving you any guidance whatsoever about how to create or host the site?

It's for a software engineering class (CS). Since she made sure there was at least one person in each group who had web development experience, she assumed that would be all she needed. Except for my group when she assigned that person to another role.

I've started looking through the tutorial my bony fealty posted, but I feel like I have no idea what I'm doing. I downloaded the Wordpress source and then found out I had to install something with myphpAdmin, so I grabbed Xampp. Then I poked around on my school's facilities page and found out they give a MySQL database service to students, but it seems I don't have permissions to create a new database:


If my guess is correct, then can I install Wordpress to the database that has my username as its name? I don't seem to have permissions to create users, either, so I can't do that part of the tutorial.

kiwid
Sep 30, 2013

fuf posted:

Speaking of software:

I've been using Linux for a long time but I'm thinking of switching to Windows, and I'm wondering how I'm gonna preserve some of my workflow. Any Windows users here who still use command line tools like grunt, bower, ssh, git etc? How do you do it? I guess I should just run a virtual linux machine?

Has Vagrant been mentioned yet? If not, look into it.

I do 90% of my workflow on Windows, and that's only because when I'm mobile, I didn't want to buy a plastic laptop so I bought a Macbook for the other 10% of the time.

After some very simple setup...
> vagrant up
> vagrant ssh

Done. Use composer, git, grunt, gulp, bower, whatever, inside the VM, rather than on Windows itself. The only thing Windows is there for is to map the web root to a share inside windows so I can use my IDE with.

If you don't want to use the existing cloud VMs, you can start your own fairly easy using: https://puphpet.com/
If you use Laravel, they keep a box updated called "Homestead". http://laravel.com/docs/4.2/homestead

kiwid fucked around with this message at 16:46 on Oct 14, 2014

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

fuf posted:

If I want to try Sublime Text should I go with 2 or 3?

I'd say the only reason to use 2 instead of 3 is if you're already using 2 with packages that aren't compatible with 3. But if you're going in fresh, go with 3.

substitute
Aug 30, 2003

you for my mum

fuf posted:

If I want to try Sublime Text should I go with 2 or 3?

Definitely version 3.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Where should I look if I wanted to find the type of up/down voting system used on sites like Stackoverflow?

kedo
Nov 27, 2007

hooah posted:

It's for a software engineering class (CS).

Sorry if this comes across as rude because I really don't intend it to be taken that way, but if you're in a software engineering class why are you refusing to learn the two simplest languages in existence? Doesn't that sort of defeat the purpose?

hooah
Feb 6, 2006
WTF?

kedo posted:

Sorry if this comes across as rude because I really don't intend it to be taken that way, but if you're in a software engineering class why are you refusing to learn the two simplest languages in existence? Doesn't that sort of defeat the purpose?

The purpose of the class is not to learn languages, but to learn the engineering part of "software engineering". I've learned C/C++ and started Prolog in classes, taught myself Java and Matlab, am currently learning Python on my own. I don't really have time to add any more to that is all.

EAT THE EGGS RICOLA
May 29, 2008

You can pick up more than enough of both to get by in a day by burning through a tutorial or two. Knowing the absolute basics of web stuff is probably important these days.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

hooah posted:

The purpose of the class is not to learn languages, but to learn the engineering part of "software engineering". I've learned C/C++ and started Prolog in classes, taught myself Java and Matlab, am currently learning Python on my own. I don't really have time to add any more to that is all.

If the project is not intended to teach you web languages, and the methods of creating and hosting the site are entirely ancillary, what's the purpose of the assignment? I'm not trying to gang up, I'm just really curious.

hooah
Feb 6, 2006
WTF?

caiman posted:

If the project is not intended to teach you web languages, and the methods of creating and hosting the site are entirely ancillary, what's the purpose of the assignment? I'm not trying to gang up, I'm just really curious.

We're doing requirements and basic prototypes for some automotive system (e.g. adaptive cruise control, automatic parking, etc.) The website is so we have a place for our deliverables and all that sort of stuff.

Kobayashi
Aug 13, 2004

by Nyc_Tattoo

hooah posted:

We're doing requirements and basic prototypes for some automotive system (e.g. adaptive cruise control, automatic parking, etc.) The website is so we have a place for our deliverables and all that sort of stuff.

So why does it have to be hosted by the school? If it's really just for deliverables, hand code an index.html file with links to all your Word documents and then drop in a stupid simple .htaccess file for faux-protection.

fuf
Sep 12, 2004

haha
Does the iphone browser try and detect phone numbers on pages and make them clickable? Client is complaining that when she clicks the phone number link it doesn't work and the number is invalid, but there is no link on the phone number. :confused:

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fuf posted:

Does the iphone browser try and detect phone numbers on pages and make them clickable? Client is complaining that when she clicks the phone number link it doesn't work and the number is invalid, but there is no link on the phone number. :confused:

Yes it does. IIRC there is a way to "turn it off" with a meta-tag, but I'm mobile posting. :google: should tell if my failing memory had one last gasp of usefulness....

cbirdsong
Sep 8, 2004

Commodore of the Apocalypso
Lipstick Apathy

fuf posted:

Does the iphone browser try and detect phone numbers on pages and make them clickable? Client is complaining that when she clicks the phone number link it doesn't work and the number is invalid, but there is no link on the phone number. :confused:

Weirdly, on the iPad, it also does this, and then usually can't do anything when you click the number, which may be what your client is seeing.

fuf
Sep 12, 2004

haha
Thanks both.

The problem with just disabling it is that she'll think I solved the problem by removing a feature, even though it's a feature I didn't know existed :v:

I think I solved it with this:
code:
<a href="tel:+442074919698">+44 (0) 207 4919 698</a>
First time I've used "tel".

It wasn't working before because of the brackets around the 0 (it started the number with 207)

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Boosh! posted:

I have a client that plans an annual conference with room for 150 visitors (very low volume).

Is there a service or an easy out of the box solution that can manage the purchasing of tickets? I looked into http://www.tickettailor.com/ but they charge a monthly fee which wouldn't be preferable because the sale window is only about 2-3 months. At worst, I'll go the PayPal route.

Maybe Eventbrite?

Chenghiz
Feb 14, 2007

WHITE WHALE
HOLY GRAIL

fuf posted:

Does the iphone browser try and detect phone numbers on pages and make them clickable? Client is complaining that when she clicks the phone number link it doesn't work and the number is invalid, but there is no link on the phone number. :confused:

drop this meta tag in your <head>:
code:
<meta name="format-detection" content="telephone=no">
source: https://developer.apple.com/library...0007899-CH6-SW1

fuf
Sep 12, 2004

haha
Design I was just given to work with :negative:


scream shoot :v:

substitute
Aug 30, 2003

you for my mum

fuf posted:

Does the iphone browser try and detect phone numbers on pages and make them click-able? Client is complaining that when she clicks the phone number link it doesn't work and the number is invalid, but there is no link on the phone number. :confused:

Probably just a number on screen that contains a dash.

This is a problem I've been dealing with for maybe 2 years now. The solution so far has been to use the Apple specific meta tag to turn off auto phone number detection for iOS devices, because any number with a dash will appear as a click-able phone number. Which is just great for things like your product/sku numbers that contain dashes.

Then I wrap all the real phones numbers on the site with <a href="tel:..., and add a specific style to those anchors to make them look like regular text -- so they don't stand out as regular click-able links on non-iOS devices.

If anyone has a better solution, PLEASE post 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!

fuf posted:

Design I was just given to work with :negative:


scream shoot :v:

It's for Halloween. :spooky:

cbirdsong
Sep 8, 2004

Commodore of the Apocalypso
Lipstick Apathy

substitute posted:

Probably just a number on screen that contains a dash.

This is a problem I've been dealing with for maybe 2 years now. The solution so far has been to use the Apple specific meta tag to turn off auto phone number detection for iOS devices, because any number with a dash will appear as a click-able phone number. Which is just great for things like your product/sku numbers that contain dashes.

Then I wrap all the real phones numbers on the site with <a href="tel:..., and add a specific style to those anchors to make them look like regular text -- so they don't stand out as regular click-able links on non-iOS devices.

If anyone has a better solution, PLEASE post it.

When I am working with product numbers like that, I just preemptively style those specific areas so that once iOS automatically creates the inappropriate links they look like regular text, and then unwrap them with jQuery once the page fully loads. Your way seems backwards!

me your dad
Jul 25, 2006

We send HTML emails using a URL shortener for links. Someone forwarded one of our emails to us, and the link looked like this:

http://ow.ly/xxxx<http://tracking-url-from-our-email-marketing-platform>

When I create the emails, I insert the ow.ly links into the HTML. When the email is sent, our email marketing platform does its magic and plugs their tracking URL into the code.

What is it called when an email client 'extracts' and displays a destination URL from a link like the example above?

Never mind - I think I figured it out. I think the HTML email was converted to plain text at some point and the links were stripped out as a result.

me your dad fucked around with this message at 18:13 on Oct 16, 2014

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fuf posted:

Design I was just given to work with :negative:


scream shoot :v:

Scan it and make it the homepage. Problem solved.

substitute
Aug 30, 2003

you for my mum

cbirdsong posted:

When I am working with product numbers like that, I just preemptively style those specific areas so that once iOS automatically creates the inappropriate links they look like regular text, and then unwrap them with jQuery once the page fully loads. Your way seems backwards!

So you add a style, then remove the style, and the non-phone numbers are still click-able (if you're on iOS)?

cbirdsong
Sep 8, 2004

Commodore of the Apocalypso
Lipstick Apathy
For numbers that iOS thinks are phone numbers but aren't:

- I add the style so that it looks like regular text as soon as it renders, and continues to, if you're a crazy person who turned off Javascript on their phone's browser.
- I use jQuery to strip the unwanted a[href|="tel:"] links out as soon as any more important Javascript is done. (Practically, this happens almost instantly, but the style prevents any weird flashes of link styling if it doesn't happen quickly enough.)

Actual phone numbers elsewhere on the site still get automatically created on iOS (and Android, I think), so I don't have to worry about adding tel: links manually and suppressing them on desktop browsers.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

I just had a :ughh: moment. Ever since I first learned CSS like 6 years ago, I've been under the impression that in-page <style> declarations always overwrite those in external style sheets. This evening I was messing around with some code and noticed that if I placed the <style> section before my style sheet link, the style sheet rules won out. Similarly, adding an extra amount of specificity to a rule, whether internal or external, caused that rule to win out. So it seems <style> rules aren't actually given precedence the way inline rules are, they're just effectively appended/prepended to the external sheet.

I'm sure 100% of you already knew this.

substitute
Aug 30, 2003

you for my mum

cbirdsong posted:

For numbers that iOS thinks are phone numbers but aren't:

- I add the style so that it looks like regular text as soon as it renders, and continues to, if you're a crazy person who turned off Javascript on their phone's browser.
- I use jQuery to strip the unwanted a[href|="tel:"] links out as soon as any more important Javascript is done. (Practically, this happens almost instantly, but the style prevents any weird flashes of link styling if it doesn't happen quickly enough.)

Actual phone numbers elsewhere on the site still get automatically created on iOS (and Android, I think), so I don't have to worry about adding tel: links manually and suppressing them on desktop browsers.

Got it, thanks for clarifying. So iOS adds the <a href="tel:..> to the source at output?

I'm not a front-end dev by trade. So my thinking on this was "these are telephone links, so semantically they should be explicitly wrapped as such with the appropriate HTML" — so it's not relying on some OS's, or browser's, automation features.

cbirdsong
Sep 8, 2004

Commodore of the Apocalypso
Lipstick Apathy

substitute posted:

Got it, thanks for clarifying. So iOS adds the <a href="tel:..> to the source at output?

I'm not a front-end dev by trade. So my thinking on this was "these are telephone links, so semantically they should be explicitly wrapped as such with the appropriate HTML" — so it's not relying on some OS's, or browser's, automation features.

Yeah, the phone OSes make them clickable by default. It would be great if we could just put them all there all the time, but desktop browsers don't handle tel: links very well.

Adbot
ADBOT LOVES YOU

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
Anyone have a favorite seo analytics tool? I need to crawl a site (WordPress, using Yoast) and generate a keyword graph but also have some estimates of Adwords cost as well.

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