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
LP0 ON FIRE
Jan 25, 2006

beep boop

Scaramouche posted:

I have no exposure to HTML5's application cache at all, but couldn't you prepend pageload with a javascript that pings something (to see if network exists) and then branch what your page does depending on that?
http://stackoverflow.com/questions/4282151/is-it-possible-to-ping-a-server-from-javascript

So I'm thinking (psuedo code)
code:
If (PingerFunction()=True)
 {
  urlPrefix = 'http://www.livesite.com/';
 }
else
 {
 urlPrefix = 'file:///C:/local/'
 }

I like this a lot. I need to find some way to upload what's stored locally on their computer, but I think I can have a server create a zip of all the files that they can download whenever something on the backend occurs. I'd like to have something more automatic just because I don't know how savvy these people are with replacing files on their computer (also the effort), but maybe they'd like this solution. Thank you very much!

Adbot
ADBOT LOVES YOU

Pokkahn
Nov 23, 2003
Tree fallin
What is the most user friendly web development software you can purchase? My boss put me in charge of creating a new website for our division of the company. I have zero experience with website design and development (good choice right?). It will be a pretty basic looking website, as far as I can tell he just wants a place to show when meetings will be held/profile pages for employees/place where vendors can register information. Can I get some suggestions on a good software to choose hopefully one that has some sort of help included since I will get to maintain this after it is created. If anyone has some other suggestions on what to get please feel free to let me know.

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

Wordpress is free and has a billion calendar plugins.

hmm yes
Dec 2, 2000
College Slice
Don't try and teach yourself how to create a website, instead just use a hosted service like Squarespace, which has calendars/form builders/good templates. Or hire a professional ;)

Oh My Science
Dec 29, 2008

Pokkahn posted:

What is the most user friendly web development software you can purchase? My boss put me in charge of creating a new website for our division of the company. I have zero experience with website design and development (good choice right?). It will be a pretty basic looking website, as far as I can tell he just wants a place to show when meetings will be held/profile pages for employees/place where vendors can register information. Can I get some suggestions on a good software to choose hopefully one that has some sort of help included since I will get to maintain this after it is created. If anyone has some other suggestions on what to get please feel free to let me know.

You are setting yourself up for failure.

Tell your boss to hire a freelancer (maybe even a goon) with the money he would spend on paying you, and the software, to do it half assed. Unless you're willing to put yourself in a bad position if / when the websites breaks don't do this yourself, they will blame you, not your boss.

If that is not an option look at Wordpress. It has a million plugins of varying quality, some of which might do what you're looking for, a decent backend for updating content (pages, blog posts, contact info), and you can host it nearly anywhere.

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Could someone explain a typical basic server-side html form verification flow to me plz?

Is it:

Submit POST from the HTML form -> server determines form is incorrect, returns 400 with page updated with previously input form text/choices and incorrect fields highlighted with CSS -> user updates fields, rePOSTs -> server validates correct, 20x to a confirmation page -> confirmation page <meta> redirects to home page?

nexus6
Sep 2, 2011

If only you could see what I've seen with your eyes
I'm looking at creating a HTML5 web app for use in offline data capture on an iPad. The idea is that someone would be able to take the iPad somewhere without an internet connection, have people fill out a registration form and save the data for later upload to a database.

I've created a proof-of-concept that works offline using appcache and stores data with web sql (was more structured than local storage).

The problem I'm facing is getting the data out of the web sql DB into a live server DB? Any ideas on how I can achieve this?

I'm aware that writing a native iOS app might be a better solution but I have neither the time to learn iOS development, the equipment to do it, nor a license from Apple.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

DreadCthulhu posted:

Could someone explain a typical basic server-side html form verification flow to me plz?

Is it:

Submit POST from the HTML form -> server determines form is incorrect, returns 400 with page updated with previously input form text/choices and incorrect fields highlighted with CSS -> user updates fields, rePOSTs -> server validates correct, 20x to a confirmation page -> confirmation page <meta> redirects to home page?

There's more than one way to skin that cat, but a widely used pattern is:

Form is POSTed to itself. --> Server decides if input is valid --> If NOT VALID, form re-rendered with previous inputs (with error highlighting on bad ones) --> if form WAS VALID a redirect (302, I think, but double check.. I let my frameworks figure that out for me) is made to the success page.

Lumpy fucked around with this message at 13:23 on Sep 26, 2013

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

Yeah, if it's not valid, return a 406 not acceptable

ahobday
Apr 19, 2007

Hopefully this is the right thread to ask about DNS stuff.

I have a domain name (https://www.example.com) registered through a domain name company called DOMAIN NAME COMPANY.

Right now the name servers for the domain name are set to those of a hosting company called HOSTING COMPANY, and through the HOSTING COMPANY control panel I've set the domain name as an addon domain.

I want to point the domain name instead at an address which looks like this:

http://1.2.3.4/~folderName/

That's an IP address, and then a sub-folder on that server.

The hosting for that address is handled by someone else. I don't have access to it.

Also, I'd like to keep control over the email addresses we have for https://www.example.com such as "EMAIL@EXAMPLE.COM", which is currently handled through the control panel at HOSTING COMPANY.

So what's the best way to about this? If I set the name servers to another hosting company then we'll lose control of the email accounts, I believe (?), and I'm not exactly clued up on A-Records/CNAMES.

Fruit Smoothies
Mar 28, 2004

The bat with a ZING
I am having real issues with pages in CSS. PHP (laravel) is rendering a multipage invoice in HTML. I have no problem generating a table containing all the rows of the invoice. However, when the pages are printed, the company want the "header" (which is the <thead> tag) of the invoice to appear on each page with a page number too!
I have absolutely no idea if this is even possible. I have spent many hours trying to create elements with the correct (cm) size for A4 paper, but different print drivers / web browsers cause endless problems with this method.

It may be worth noting, that the rest of the site is built using Angular which could be used for some pagination logic.

PLEASE stop me having to generate these using PDFLIB and PHP.

Many thanks!

SEKCobra
Feb 28, 2011

Hi
:saddowns: Don't look at my site :saddowns:

Centipeed posted:

Hopefully this is the right thread to ask about DNS stuff.

I have a domain name (https://www.example.com) registered through a domain name company called DOMAIN NAME COMPANY.

Right now the name servers for the domain name are set to those of a hosting company called HOSTING COMPANY, and through the HOSTING COMPANY control panel I've set the domain name as an addon domain.

I want to point the domain name instead at an address which looks like this:

http://1.2.3.4/~folderName/

That's an IP address, and then a sub-folder on that server.

The hosting for that address is handled by someone else. I don't have access to it.

Also, I'd like to keep control over the email addresses we have for https://www.example.com such as "EMAIL@EXAMPLE.COM", which is currently handled through the control panel at HOSTING COMPANY.

So what's the best way to about this? If I set the name servers to another hosting company then we'll lose control of the email accounts, I believe (?), and I'm not exactly clued up on A-Records/CNAMES.

The host of ip/folder would have to set things up for that to work. Email is unrelated tho.

ahobday
Apr 19, 2007

SEKCobra posted:

The host of ip/folder would have to set things up for that to work. Email is unrelated tho.

OK, I'll get in touch with them.

When you say email is unrelated, is that because you're assuming we handle email through our domain registrar? Because currently we do it through the host.

So we point a domain name at the host, then set up an addon domain, then assign a mail account to it.

Mister Chief
Jun 6, 2011

Fruit Smoothies posted:

I am having real issues with pages in CSS. PHP (laravel) is rendering a multipage invoice in HTML. I have no problem generating a table containing all the rows of the invoice. However, when the pages are printed, the company want the "header" (which is the <thead> tag) of the invoice to appear on each page with a page number too!
I have absolutely no idea if this is even possible. I have spent many hours trying to create elements with the correct (cm) size for A4 paper, but different print drivers / web browsers cause endless problems with this method.

It may be worth noting, that the rest of the site is built using Angular which could be used for some pagination logic.

PLEASE stop me having to generate these using PDFLIB and PHP.

Many thanks!

I've done this using JavaScript before but the second time I used Fpdf which has that sort of functionality built in.

Oh My Science
Dec 29, 2008

Centipeed posted:

When you say email is unrelated, is that because you're assuming we handle email through our domain registrar? Because currently we do it through the host.

Email is handled by a series of MX records. If you change nameservers you will have to setup the new DNS MX records to whatever your host requires for email.

If this is a business email maybe take this opportunity to upgrade yourself to a google apps account or use the new microsoft outlook service.

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.
Any idea on a better way to display this information overload?


What's being display:
For a given timeframe, show the following fields:
Total (if fake is 0, shown without T, else with)
Fake (hidden if zero) as F
Built as B
Scheduled as S
Jobs as Jobs
Buffer as Buffer
Techs as Techs
Contractors as Contractors

The business owners want it all there per timeframe explicitly as I've tried to hide some of it in tooltips before and the suggestion was declined.

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

That looks frustrating but I'm not sure the parentheses are helping very much

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

This is kinda weird. I'm trying to be very specific with link colors in a CSS selector, but it's being applied greedily to elements not even contained within it. I've got a setup like this:
code:
<div class="col1">
 Stuff consisting mostly of my category menu
</div>
<div class="col2" id="maincontent">
 Primary content area
</div>
And the CSS generally looks like:
code:
.col1 { stuff; }
.col2 { more stuff; }
#maincontent > a, a:link, a:visited { link stuff; j}
However, links within the col1 class are displaying the behavior defined in #maincontent, even though they are adjacent to it instead of descended from it. What's going on, is it not possible to be specific with the a psuedo-classes, and once defined they are set to be page wide?

cbirdsong
Sep 8, 2004

Commodore of the Apocalypso
Lipstick Apathy
You need to be more specific in each declaration of a, like:

code:
#maincontent > a, #maincontent > a:link, #maincontent > a:visited { link stuff; }
Your code is setting the color for <a> tags that are direct children of #maincontent, and then overriding the styles for a:link and a:visited page-wide.

Depressing Box
Jun 27, 2010

Half-price sideshow.

Scaramouche posted:

And the CSS generally looks like:
code:
.col1 { stuff; }
.col2 { more stuff; }
#maincontent > a, a:link, a:visited { link stuff; j}

You're applying the :link and :visited styles globally. It should look more like this:
CSS code:
#maincontent > a,
#maincontent > a:link,
#maincontent > a:visited {
	/* link stuff */
}

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

Scaramouche posted:

CSS code:
.col1 { stuff; }
.col2 { more stuff; }
#maincontent > a, a:link, a:visited { link stuff; j}

You're going to want

CSS code:
#maincontent a, #maincontent a:link, #maincontent a:visited { link stuff; }
or else the a:link and a:visited are going to be site-wide. the commas are separating your selectors, not nesting them.

ninja edit: this is why I use css preprocessors :)

A MIRACLE fucked around with this message at 20:12 on Sep 26, 2013

pipes!
Jul 10, 2001
Nap Ghost

Fruit Smoothies posted:

I am having real issues with pages in CSS. PHP (laravel) is rendering a multipage invoice in HTML. I have no problem generating a table containing all the rows of the invoice. However, when the pages are printed, the company want the "header" (which is the <thead> tag) of the invoice to appear on each page with a page number too!
I have absolutely no idea if this is even possible. I have spent many hours trying to create elements with the correct (cm) size for A4 paper, but different print drivers / web browsers cause endless problems with this method.

It may be worth noting, that the rest of the site is built using Angular which could be used for some pagination logic.

PLEASE stop me having to generate these using PDFLIB and PHP.

Many thanks!

Try this:

CSS code:
@media print {
thead 
    {
        display: table-header-group;
    }
}
More info here.


A MIRACLE posted:

ninja edit: this is why I use css preprocessors :)

And an OOCSS-based approach, as well.

pipes! fucked around with this message at 21:00 on Sep 26, 2013

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!


Yep, that's got it sorted. Don't know why I was thinking that the descendant would be inherited; too much hierarchical database work lately I think. Thanks guys!

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.

A MIRACLE posted:

That looks frustrating but I'm not sure the parentheses are helping very much
Yeah, they were there initially to group the abbreviation with the number without having to bump the number and abbreviation together (like 374T, 455B, etc)

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

Lumpy posted:

There's more than one way to skin that cat, but a widely used pattern is:

Form is POSTed to itself. --> Server decides if input is valid --> If NOT VALID, form re-rendered with previous inputs (with error highlighting on bad ones) --> if form WAS VALID a redirect (302, I think, but double check.. I let my frameworks figure that out for me) is made to the success page.

Cool, thank you!

A MIRACLE posted:

Yeah, if it's not valid, return a 406 not acceptable

I might be wrong about this, but isn't 406 a content-negotiation-specific code, and thus not in any way related to the actual parameter set? In this case, the request is "malformed" and so a 400 is the more appropriate code. I'm using this http decision graph library based off of Erlang's WebMachine and it's pretty anal about these things, heh.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

DreadCthulhu posted:

I might be wrong about this, but isn't 406 a content-negotiation-specific code, and thus not in any way related to the actual parameter set? In this case, the request is "malformed" and so a 400 is the more appropriate code. I'm using this http decision graph library based off of Erlang's WebMachine and it's pretty anal about these things, heh.

You are not wrong! 406 is very specifically about Accept headers. A lot of HTTP status codes look like would have generic REST-y applications but they really don't and a lot of http plumbing relies on not abusing them.

If you want something a little more specific then 400 that is still somewhat "standard" look at the WebDAV codes - 422 for example.

https://tools.ietf.org/html/rfc2616#section-10.4.7 posted:

pre:
10.4.7 406 Not Acceptable

   The resource identified by the request is only capable of generating
   response entities which have content characteristics not acceptable
   according to the accept headers sent in the request.

Skiant
Mar 10, 2013

Uziel posted:

Any idea on a better way to display this information overload?


What's being display:
For a given timeframe, show the following fields:
Total (if fake is 0, shown without T, else with)
Fake (hidden if zero) as F
Built as B
Scheduled as S
Jobs as Jobs
Buffer as Buffer
Techs as Techs
Contractors as Contractors

The business owners want it all there per timeframe explicitly as I've tried to hide some of it in tooltips before and the suggestion was declined.

You have to establish a proper information hierarchy.

Pick up one — and only one — field being the most important (something that helps you scan the document quickly is preferred), make it stand out from the rest (size, boldness, color).
Then, establish if you have one or two other levels of information, and define a style for those (grayed out instead of black, smaller font, …).

The fact that the text organization is so much different between the tiny box on the left and the large one on the far right doesn't help neither because you don't have a defined visual structure in common between all your cells, but if they don't want to hear about a tooltip, it's not exactly something you can fix easily.

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.

Skiant posted:

You have to establish a proper information hierarchy.

Pick up one — and only one — field being the most important (something that helps you scan the document quickly is preferred), make it stand out from the rest (size, boldness, color).
Then, establish if you have one or two other levels of information, and define a style for those (grayed out instead of black, smaller font, …).

The fact that the text organization is so much different between the tiny box on the left and the large one on the far right doesn't help neither because you don't have a defined visual structure in common between all your cells, but if they don't want to hear about a tooltip, it's not exactly something you can fix easily.
Thank you, this is very helpful.
My initial reaction is that there are a few levels:
1.) The timeframe name which is a link.
2.) The total
3.) The numbers that comprise that total (real, fake, built, scheduled, buffer)
4.) The job, tech and contractor counts.

I'll look at organizing them so that the hierarchy is visually shown.

glompix
Jan 19, 2004

propane grill-pilled
What's the consensus on broadly denying the less-useful HTTP verbs like OPTION and DELETE? Our apps aren't RESTful or anything, just GET/POST. I thought this would generally be a bad idea, but I'm not sure if my idea is valid anymore. I certainly don't like the idea of denying HEAD.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Uziel posted:

Thank you, this is very helpful.
My initial reaction is that there are a few levels:
1.) The timeframe name which is a link.
2.) The total
3.) The numbers that comprise that total (real, fake, built, scheduled, buffer)
4.) The job, tech and contractor counts.

I'll look at organizing them so that the hierarchy is visually shown.

Here's a too-fast visual stab at what Skiant posted. Info is consistent, the times and "important" number jump out visually. Layout for one hour box shifts (inline-block hooray!) but keeps the same "feel".

Only registered members can see post attachments!

wwb
Aug 17, 2004

Drupal specific question but I can't find that thread so I'll just ask here -- how bad is it not to have a salt in your configuration?

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.

Lumpy posted:

Here's a too-fast visual stab at what Skiant posted. Info is consistent, the times and "important" number jump out visually. Layout for one hour box shifts (inline-block hooray!) but keeps the same "feel".


This is awesome, thank you. I guess I'm too close to it but I have no idea why I didn't think of orienting the shorter time-frames vertically.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

wwb posted:

Drupal specific question but I can't find that thread so I'll just ask here -- how bad is it not to have a salt in your configuration?

If said salt is part of the password hashing process, then it can range from "bad" to "oh man, you are hosed".

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

glompix posted:

What's the consensus on broadly denying the less-useful HTTP verbs like OPTION and DELETE? Our apps aren't RESTful or anything, just GET/POST. I thought this would generally be a bad idea, but I'm not sure if my idea is valid anymore. I certainly don't like the idea of denying HEAD.

I don't know your specific application but I do know that PCI Certification/McAfee Secure/etc. will insist that you get rid of verbs like TRACE, DEBUG, and OPTIONS before they'll clear you for security certification.

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Isn't OPTIONS pretty much mandatory for any kind of CORS work involving non-idempotent HTTP verbs? I don't think you can just instruct the browser to skip the pre-flight CORS OPTIONS request, but maybe I'm missing something.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA

DreadCthulhu posted:

Isn't OPTIONS pretty much mandatory for any kind of CORS work involving non-idempotent HTTP verbs? I don't think you can just instruct the browser to skip the pre-flight CORS OPTIONS request, but maybe I'm missing something.

Yeps. You need it.

wwb
Aug 17, 2004

Lumpy posted:

If said salt is part of the password hashing process, then it can range from "bad" to "oh man, you are hosed".


I presumed that range though I can at least say there aren't public logins on this site so we are probably more "bad" than "hosed".

Corollary question is "what happens when we add one to a running instance?"

glompix
Jan 19, 2004

propane grill-pilled

Scaramouche posted:

I don't know your specific application but I do know that PCI Certification/McAfee Secure/etc. will insist that you get rid of verbs like TRACE, DEBUG, and OPTIONS before they'll clear you for security certification.

Thanks! I'm not doing REST/CORS, so sounds like we might as well. I figured some UA or proxy server out there probably uses HEAD, but I didn't know about the compliance stuff since my company is easy street.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

wwb posted:

I presumed that range though I can at least say there aren't public logins on this site so we are probably more "bad" than "hosed".

Corollary question is "what happens when we add one to a running instance?"

That will largely depend on your backend. I don't know squat about Drupal, but some systems sore hashed passwords along with the individual salt for that record and the hash method (either directly in the password entry, or elsewhere in the system.) If Drupal is such a system, the answer would be "nothing". If Drupal is doing something like using the same salt for every password, it may not be that smart, and then the answer would likely be "nobody would be able to log in except new accounts."

Adbot
ADBOT LOVES YOU

spacebard
Jan 1, 2007

Football~

Lumpy posted:

If Drupal is doing something like using the same salt for every password, it may not be that smart, and then the answer would likely be "nobody would be able to log in except new accounts."

This. Drupal is behind the curve (maybe able to swap in bcrypt/PHP 5.5).

wwb posted:

Corollary question is "what happens when we add one to a running instance?"

There is a module called mass_pwreset, which will reset all passwords and send one-time login links, but you should remove that as it's a risk to keep it installed. Also look into using password_policy module.

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