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
Roadie
Jun 30, 2013
You may also want to look at a more boutique CMS that can act as like a halfway step between the Wordpress world and a full top-to-bottom-custom site in Django or Rails. One good example is Craft CMS, which manages all the database stuff for you but lets/requires you to write the whole frontend, using templates + custom PHP plugins for any really weird stuff.

Adbot
ADBOT LOVES YOU

Empress Brosephine
Mar 31, 2012

by Jeffrey of YOSPOS
Awesome thanks all. I like WordPress but it’s very easy to get into the trap of plugins and can be a pain in the rear end to do something simple that isn’t bloated imho.

kedo
Nov 27, 2007

Empress Brosephine posted:

Awesome thanks all. I like WordPress but it’s very easy to get into the trap of plugins and can be a pain in the rear end to do something simple that isn’t bloated imho.

That would be the point of learning PHP, so you could do the simple things yourself without needing to use a plugin. WordPress in and of itself is a solid, useful platform. It sounds like where you’re at right now is “I can use WordPress,” whereas if you knew PHP and JS you would be more of a WP dev.

Anywho, that’s my two cents.

prom candy
Dec 16, 2005

Only I may dance
What's your goal here? Learning for the sake of learning? Do you have a personal project or business idea you want to build? Do you want to start freelancing? Looking to get a job? There's a lot of different directions you can go in but your eventual goal should probably inform your next steps. For example if you want to freelance or work at an agency then deep diving on the Wordpress stack would probably be smart. If you want to build your own SaaS startup then you would probably want to start learning a different stack.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Empress Brosephine posted:

Awesome thanks all. I like WordPress but it’s very easy to get into the trap of plugins and can be a pain in the rear end to do something simple that isn’t bloated imho.

It is, in fact a lot of the sites I get hired to fix things on are a mess and maze of plugins and it takes me hours to find out what's causing it. People know WordPress, but they put in plugins to do simple things that can be done with two lines of JS or putting one line in functions.php.

Speaking of WordPress and plugins, I'm fed up with bloated form manager plugins that add tons of JavaScript and useless styles. Most sites just need a simple "Name, Email, Phone Number, Message" with maybe a dropdown for "Reason for Contacting Us" or something. I'd also need something for a date picker (I think there are PHP snippets for that?) and file uploading, and of course reCAPTCHA because web design clients get scared of spam if they don't see the "prove you're not a robot" checkbox, but the tricky part is I'd want it to store form submissions in the WP database. I found this which seems to be a good start for at least having a form and having WordPress's wp_mail function send it, but does anyone have experience writing such a thing that can tell me pitfalls to avoid?

Thermopyle
Jul 1, 2003

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

kedo posted:

WordPress in and of itself is a solid, useful platform.

I don't think I would agree with the "solid" part. It's a house of cards.

ModeSix
Mar 14, 2009

Thermopyle posted:

I don't think I would agree with the "solid" part. It's a house of cards.

I would say the core platform is solid. It's the plugins that are the problem.

tankadillo
Aug 15, 2006

I found developing my own WordPress site to be surprisingly pleasant. It has a ton of features for developers that are really well documented. The problem is that it’s also extremely easy to make a bad plugin/theme and they have virtually no quality control.

Empress Brosephine
Mar 31, 2012

by Jeffrey of YOSPOS
For personal development, I’m not looking to go professional. I just like chasing the dragon of a extremely fast score on GTMetrix and Google PS.

PT6A
Jan 5, 2006

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

Roadie posted:

You may also want to look at a more boutique CMS that can act as like a halfway step between the Wordpress world and a full top-to-bottom-custom site in Django or Rails. One good example is Craft CMS, which manages all the database stuff for you but lets/requires you to write the whole frontend, using templates + custom PHP plugins for any really weird stuff.

If you want to eventually transition to Django more completely, Wagtail is also a pretty fun CMS.

go play outside Skyler
Nov 7, 2005


WordPress as a platform is excellent. Well documented, stable and a good balance of native features while staying minimalist.

The plug-ins, well, are a mixed bag. There's some good stuff like Woocommerce and such.

Then the templates are absolutely all god awful. Do not ever use a WP template.

kedo
Nov 27, 2007

LifeLynx posted:

It is, in fact a lot of the sites I get hired to fix things on are a mess and maze of plugins and it takes me hours to find out what's causing it. People know WordPress, but they put in plugins to do simple things that can be done with two lines of JS or putting one line in functions.php.

Speaking of WordPress and plugins, I'm fed up with bloated form manager plugins that add tons of JavaScript and useless styles. Most sites just need a simple "Name, Email, Phone Number, Message" with maybe a dropdown for "Reason for Contacting Us" or something. I'd also need something for a date picker (I think there are PHP snippets for that?) and file uploading, and of course reCAPTCHA because web design clients get scared of spam if they don't see the "prove you're not a robot" checkbox, but the tricky part is I'd want it to store form submissions in the WP database. I found this which seems to be a good start for at least having a form and having WordPress's wp_mail function send it, but does anyone have experience writing such a thing that can tell me pitfalls to avoid?

WPmudev makes truly poo poo, bloatware plugins that usually have to phone home for no apparent reason, so I avoid them (and anything they have to say) like the plague. The one major thing that blog post misses is that once the email leaves your server you don’t actually know if it will end up in someone’s inbox.

Gravity Forms is my go to form plugin because it’s simple and has been around for ages so it has good support and extensions. Rolling your own and using wp_mail is reasonable, but I’ve found that at some point some (but not all) messages will get lost along the way (spam filters, blacklists, etc), so having form entries saved in the WP database is a good fallback instead of having to tell a client, “whoops, looks like those two months worth of emails that were sent before anyone noticed the error are gone forever!” I’ve run into that issue more times than I can count. Email is black magic that works sometimes, and you shouldn’t rely on it entirely if you’re dealing with an important form.

Empress Brosephine
Mar 31, 2012

by Jeffrey of YOSPOS
It looks like Craft CMS is what’s next for me...I just know nothing about self hosting rip. Thanks for the heads up though I’m going to try to figure this out

Raskolnikov2089
Nov 3, 2006

Schizzy to the matic

Empress Brosephine posted:

It looks like Craft CMS is what’s next for me...I just know nothing about self hosting rip. Thanks for the heads up though I’m going to try to figure this out

Nah. Use contentful and netlify, go all in on the JAMstack.

EZ mode.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

kedo posted:

WPmudev makes truly poo poo, bloatware plugins that usually have to phone home for no apparent reason, so I avoid them (and anything they have to say) like the plague. The one major thing that blog post misses is that once the email leaves your server you don’t actually know if it will end up in someone’s inbox.

Gravity Forms is my go to form plugin because it’s simple and has been around for ages so it has good support and extensions. Rolling your own and using wp_mail is reasonable, but I’ve found that at some point some (but not all) messages will get lost along the way (spam filters, blacklists, etc), so having form entries saved in the WP database is a good fallback instead of having to tell a client, “whoops, looks like those two months worth of emails that were sent before anyone noticed the error are gone forever!” I’ve run into that issue more times than I can count. Email is black magic that works sometimes, and you shouldn’t rely on it entirely if you’re dealing with an important form.

Gravity Forms costs money, and I don't feel I could convince my main client (who I do a lot of sites for) to shell out $$$ for each site for a contact form when "there are free ones that work". I'd love to roll my own and have a simple way of putting it into the WP database. If you know a good starting point for doing that and making sure the email form is secure (last thing I want to do is open the sites up to SQL injections or whatever), let me know! I'm pretty sure I can figure out JavaScript field validations, but the PHP and database stuff is harder.

I agree that emails are black magic though, I get at least three emails a month that are along the lines of "Client's contact form submissions keep going to their Outlook/Gmail's spam folder, can you figure out why?"

my bony fealty
Oct 1, 2008

Ninja Forms is a good free alternative to Gravity. I havent used it in years since the 3.0 update broke everything tho. I assume it's better now. Gravity really is the gold standard but I wouldnt pay for it if you only need simple forms. I've built some more complex registration and payment systems with Gravity and been really happy with how extensible it is, especially REST api capability.

Y'all see the Pipdig scandal? Crazy what a bad actor in the WP community can do. Sad to see people defending them.

fuf
Sep 12, 2004

haha

LifeLynx posted:

I agree that emails are black magic though, I get at least three emails a month that are along the lines of "Client's contact form submissions keep going to their Outlook/Gmail's spam folder, can you figure out why?"

Something like https://mandrill.com/ is helpful for this. A trustworthy middleman between your hosting (which could be on all kinds of spam blacklists) and your client's inbox. There are plugins (lol) that will change WordPress to route all email through Mandrill or Mailgun or a similar service.

Seconding Ninja forms as a good forms plugin.

One of the big benefits of using WordPress to learn web development is that it's so popular that every conceivable problem or question you have has been answered a million times. Some of the answers will be bad but there's no shortage of information.

By contrast I've been trying to learn Umbraco recently and you're really kind of on your own for a lot of stuff. The forums are friendly and the documentation that exists is good but it's just a lot tougher because it's not as popular.

Actually it's been kind of demoralising and I'm thinking of going back to WordPress and focusing on PHP, even though it's a lot less "cool". I'm trying to make the jump from jack-of-all-trades freelancer to finding an actual position as a dev somewhere, and it's really hard to know what to focus on.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
Ninja Forms is okay, but ugh, that interface is hideous and slow. I never understood why they had to take the UI out of WordPress's environment. It also sucks that the file upload feature is $49/yr., so if a client suddenly wants a field that allows their visitors to upload a photo or something, now I have to tell the boss at the firm that it's going to cost a good amount per year. It looks like in 2019 I'm not going to find a form plugin that is free and has all the features out of the box. That used to be possible, but all the good form managers got too big and started parting out some important features at yearly fees.

kedo
Nov 27, 2007

LifeLynx posted:

Gravity Forms costs money, and I don't feel I could convince my main client (who I do a lot of sites for) to shell out $$$ for each site for a contact form when "there are free ones that work". I'd love to roll my own and have a simple way of putting it into the WP database. If you know a good starting point for doing that and making sure the email form is secure (last thing I want to do is open the sites up to SQL injections or whatever), let me know! I'm pretty sure I can figure out JavaScript field validations, but the PHP and database stuff is harder.

Having the form submit to a custom post type would probably work: https://wordpress.stackexchange.com/questions/11288/form-to-add-posts-to-custom-post-type I've heard good things about Ninja Forms too, but I've had a Gravity Forms developer license forever, so I use it everywhere.

In terms of convincing the client – if you do enough sites for them, you might be able to just bundle the cost in with your bill. I don't know how your relationship/billing works with them.

fakeedit: Wow, pricing is way higher than it used to be. I think I must be grandfathered in with my old developer license – it's only $99/year for unlimited everything.

ConanThe3rd
Mar 27, 2009
I have a HTML / JS project that draws from an API and I'm looking to get it so that I can hide my api key in a .env so I can show it in public for my portfolio, what's the COA for that?

prom candy
Dec 16, 2005

Only I may dance
I have a mobile web app and for a long time I've had the understanding that you can't really do fixed bottom bars because iOS Safari does that annoying poo poo where it'll show/hide the status bar depending on where you're scrolling, and it just pops the status bar right on top of your content. Recently our designer discovered that Headspace has it set up so that the status bar and address bar just never disappear, and so now he wants to do the same thing for our app and I can't figure out how they're doing it. I tried copying over their meta tags but that doesn't seem to make a difference, so now I'm wondering if they're doing some kind of weird scroll jack approach or if there's another technique that I'm not aware of. There's a million questions on Stack Overflow about how to make the status bar disappear (which Apple really doesn't want you to do, understandably) but I can't find anything when I search for making it not disappear... anyone know anything about this?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

prom candy posted:

I have a mobile web app and for a long time I've had the understanding that you can't really do fixed bottom bars because iOS Safari does that annoying poo poo where it'll show/hide the status bar depending on where you're scrolling, and it just pops the status bar right on top of your content. Recently our designer discovered that Headspace has it set up so that the status bar and address bar just never disappear, and so now he wants to do the same thing for our app and I can't figure out how they're doing it. I tried copying over their meta tags but that doesn't seem to make a difference, so now I'm wondering if they're doing some kind of weird scroll jack approach or if there's another technique that I'm not aware of. There's a million questions on Stack Overflow about how to make the status bar disappear (which Apple really doesn't want you to do, understandably) but I can't find anything when I search for making it not disappear... anyone know anything about this?

I’m bored in an airport so I’m going to theorycraft that they have a flexbox layout with the bottom bar being fixed size top div that holds content above it being flex: 1 and that scrolls but the page size is always one screen tall no matter what. My guess is that is totally wrong, but it killed 2 minutes of my 3.5 hour layover.

prom candy
Dec 16, 2005

Only I may dance
Ah, I think you're pretty much right! Their root html element is position fixed and then everything happens inside there, and then they also have a main-content div that's flex-grow: 1 and it also is set to overflow-y: scroll. Here I was downloading their source maps and inspecting their event listeners, didn't even consider the pure CSS solution. Thanks!

susan b buffering
Nov 14, 2016

ConanThe3rd posted:

I have a HTML / JS project that draws from an API and I'm looking to get it so that I can hide my api key in a .env so I can show it in public for my portfolio, what's the COA for that?

If you’re running node on the back end dotenv is what you want. Most languages will have a similar package, possibly with that same exact name.

If you aren’t running a back end server this isn’t really possible to do effectively, because the client would necessarily have access to the key.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
Babby's first React build:

I have npm installed. In VSCode, I open a terminal in the folder I want and type create-react-app my-app. Open up index.js and put this in there:

code:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

serviceWorker.unregister();

class MyClass extends React.Component {
    render() {
        return <h1>Hello world!</h1>;
    }
}
  
export default App;

ReactDOM.render(
    <MyClass />,
    document.getElementById('root')
);
I hit save, and it loads up in the localhost:3000 version with "Hello world!" in glorious bold black text. So in the terminal, I type npm run build and it does its thing no problem. Now my babby question is, I open up index.html in the build folder... and it's blank. Same with the index.html in the public folder. Shouldn't my "Hello world!" text be displaying?

tankadillo
Aug 15, 2006

You can’t open the html file directly; it needs to be served over http. You can run the command “serve build” (or “npx serve build”) and open it again on localhost.

ConanThe3rd
Mar 27, 2009

skull mask mcgee posted:

If you aren’t running a back end server this isn’t really possible to do effectively, because the client would necessarily have access to the key.

Had a feeling that was the case. I think I'll get all the functionality working on a static HTML and then figure out what to do next in terms of getting a to b.

uncle blog
Nov 18, 2012

So I'm building this web page that's being rendered by JVM, which is running locally on my mac. What's the easiest way to check how it looks on a windows machine, short of deploying it on another server?

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
There's a website called browserstack that's exactly what it's for

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

uncle blog posted:

So I'm building this web page that's being rendered by JVM, which is running locally on my mac. What's the easiest way to check how it looks on a windows machine, short of deploying it on another server?

Microsoft provides free virtual machines with lots of browsers: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

Of course, they also have a link to Browserstack on that page, so check that out first!

Tei
Feb 19, 2011
Probation
Can't post for 5 days!
Testing on a virtual machine is a better way than others. Is faster, simple, and the bugs will be the same.

In the past I have tried to emulate different versions of IE with the same windows image, and the bugs where different.
The images that Microsoft provide can last 90 days or something like that, plenty of time and can be refreshed (but I download them again, because I am dumb).

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

uncle blog posted:

So I'm building this web page that's being rendered by JVM, which is running locally on my mac. What's the easiest way to check how it looks on a windows machine, short of deploying it on another server?
If you already have a windows machine, use something like https://ngrok.com/ which will allow you to expose your local server running on mac to the public internet.

The Fool
Oct 16, 2003


Gmaz posted:

If you already have a windows machine, use something like https://ngrok.com/ which will allow you to expose your local server running on mac to the public internet.

Don't do this.

ngrok should not exist

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India
Mind explaining why?

The Fool
Oct 16, 2003


Just imagine the average developer with a poorly configured dev environment being able to expose ports at will to the public internet with no security oversight?

Don't get me wrong, a service like ngrok has some perfectly valid use cases, but I guarantee a significant amount of its user base has no consideration for the potential ramifications their desire for a quick workaround has.

kzersatz
Oct 13, 2012

How's it the kiss of death, if I have no lips?
College Slice

The Fool posted:

Just imagine the average developer with a poorly configured dev environment being able to expose ports at will to the public internet with no security oversight?

Don't get me wrong, a service like ngrok has some perfectly valid use cases, but I guarantee a significant amount of its user base has no consideration for the potential ramifications their desire for a quick workaround has.

This won't pass any form of security audit either, the moment your dummy developer can do things his way, is the moment you're boned.

kedo
Nov 27, 2007

BrowserStack is a godsend. Once it reached maturity I was incredibly happy to delete the five or six virtual machines on my laptop I kept around solely for IE testing purposes. God that poo poo was terrible.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

The Fool posted:

Just imagine the average developer with a poorly configured dev environment being able to expose ports at will to the public internet with no security oversight?

Don't get me wrong, a service like ngrok has some perfectly valid use cases, but I guarantee a significant amount of its user base has no consideration for the potential ramifications their desire for a quick workaround has.
You expose one port where you serve your local dev server. As long you're doing just that and not opening every port ever I don't see a problem. Personally I use it rarely, mostly when developing something with 3rd party webhooks, and it's only open for a small amount of time.

The Fool
Oct 16, 2003


Gmaz posted:

You expose one port where you serve your local dev server. As long you're doing just that and not opening every port ever I don't see a problem.

Yet, it is still a problem.

quote:

Personally I use it rarely, mostly when developing something with 3rd party webhooks, and it's only open for a small amount of time.

And that is mostly ok, the replay feature looks especially nice for that use case.

But yet, ngrok doesn't offer any security considerations until their highest tier plan, and I find that problematic.

Adbot
ADBOT LOVES YOU

lunar detritus
May 6, 2009


I mean, one thing is that it has some security implications but one completely different is to go

The Fool posted:

ngrok should not exist

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