|
Skandranon posted:Oh... yes, you are doing the ajax part wrong. You are going to hit your "savedJSONTree = window.sessionStorage.getItem("jsonTree");" before your AJAX call returns, your Success function passed into $.getJSON is not blocking. You need to deal with this in a completely async way. Your "savedJSONTree = window.sessionStorage.getItem("jsonTree");" line should be IN your success callback. code:
EDIT: Oh I need .success(function(data){, still though, that second console.log outputs null, is that because it's not in the success either?
|
# ? Mar 14, 2016 17:32 |
|
|
# ? May 10, 2024 12:34 |
|
The Merkinman posted:That's what I thought, but, is my syntax wrong? Your success function needs a param to accept the data returned from the call.
|
# ? Mar 14, 2016 18:11 |
|
Lumpy posted:Your success function needs a param to accept the data returned from the call. Yeah that was my EDIT: So then I called the first function (the one I had on pageload) after that. And the other one is onclick so 'jsonTree' will have a value at that point. Looks like it all works now
|
# ? Mar 14, 2016 18:29 |
|
Does anyone want to share experiences/opinions on current shopping carts and payment systems out there? I have a fairly complex and custom use case at work, and I'm struggling with finding some software/service that can solve some of the more painful aspects. I fear we'll end up writing most, if not all, of a custom shopping cart/customer portal and tie-in some payment system like Stripe. I've looked at Magento, Shopify, BigCommerce, PinnacleCart, WooCommerce ...
|
# ? Mar 15, 2016 20:11 |
|
substitute posted:Does anyone want to share experiences/opinions on current shopping carts and payment systems out there? A client of ours wants to implement a bilingual shopping cart with social media logins, recurring orders, and in-store-pickup-only delivery methods. Suffice to say I've tried just about everything under the sun. On the surface Shopify is amazing - tons of plugins and templates, close integration with physical EMV readers and complete cash register systems...Then you realize that you're going to be nickle-and-dimed to death. I suppose once you start doing a certain amount of business the $200/mo you could end up paying for the higher tier packages as well as plugins, hardware, etc... is a drop in the bucket, but god drat if Shopify doesn't snowball real quick. I don't know if you've tried them out but Volusion was high up on the list of packages we recommended for implementation. It's pretty featureful without going the Shopify "charge for everything" route. There aren't any plugins to speak of but the package pricing is pretty good for all of its standard features. That said, Volusion sites don't look as nice as Shopify ones so you'd probably want to spend some time tweaking a template to add that little bit of polish that all of the templates kinda lack. If you need multilingual support (but only need a basic shopping cart), Smoolis is worth considering. They had by far the best interface for managing UI translations across multiple languages. Unfortunately their store functionality felt pretty barebones, and they don't have any plugins either so you're stuck with whatever they implement. At least their templates look presentable! IAmKale fucked around with this message at 21:04 on Mar 15, 2016 |
# ? Mar 15, 2016 20:51 |
|
Not sure if this is the best place to ask but: I need to be able to redirect all requests to /rd* (like, http://whatever/rdfile.php and http://whatever/rdfoo/bar.php) to a single other location. What's the best way to do this in Apache? I assume with mod_rewrite but I can't quite figure out the string to use. I've tried a few things but none are sticking. I can't do an HTTP redirect (which I did get working) because this has to pass along the original URI.
|
# ? Mar 15, 2016 23:27 |
|
Golbez posted:redirect all requests to /rd* (like, http://whatever/rdfile.php and http://whatever/rdfoo/bar.php) to a single other location. code:
|
# ? Mar 16, 2016 00:32 |
|
IAmKale posted:Hey e-commerce project buddy, I just came off a pretty extensive search of current shopping cart systems so we're in the same boat Thanks for the suggestions, I'll investigate. I didn't mention it, but yes the site we're going to release will support 20+ languages worldwide. It's going to be a nightmare for various reasons.
|
# ? Mar 16, 2016 20:38 |
|
Encoding question: I'm trying to restore a Wordpress database dump that was created with this command: code:
(I think this might be because I was doing "> dump.sql" instead of using "--result-file"?) The CREATE_TABLE command in the dump file has "DEFAULT CHARSET=utf8", but when I import it using phpmyadmin or wp-cli then the encoding of post content is still messed up (apostrophes replaced by "â"). I thought maybe I could convert back to utf-8: code:
(same with "set fileencoding" in vim) Is there any way to get the proper formatting back? Or is the problem that mysqldump actually converted those utf-8 characters into different characters when it wrote the dump file? I could do it with some search-replacing maybe? Sorry if this makes no sense, I barely understand character encoding.
|
# ? Mar 21, 2016 17:54 |
|
You're probably actually OK, as long as all the defaults present on the machine you're importing to are identical to the original. UTF-8 is a way to represent a Unicode character as a sequence of bytes where all the things that were in the original 7-bit ASCII character set still line up. You can "safely" store a UTF-8 encoded Unicode character in any 8-bit character set based on 7-bit ASCII, including Latin-1. That is, any legal UTF-8 sequence of bytes is also a legal Latin-1 sequence of bytes (though the opposite is not true). You can still take the raw bytes, tell the client that it's UTF-8, and it'll be perfectly fine. This happened because PHP doesn't have a deep understanding of character sets. PHP strings are just a series of bytes without the encoding attached in any way. If the PHP application is serving content in UTF-8 and asks for UTF-8 form submissions, the dumb PHP strings will be UTF-8 encoded. Because the Latin-1 of both the MySQL database (and presumably the connection itself) can contain UTF-8 sequences, it gets both stored and retrieved "correctly." If you're using MySQL 5.5 or better, you *can* fix it, if you really want. You'll need to create a new copy of each table (using utf8mb4 & utf8mb4_unicode_ci), then take turns manually setting the Latin-1 character set for the connection, selecting data out, then setting the connection back to utf8mb4 and inserting the data back. If you're on a lower version of MySQL, utf8mb4 isn't available and you shouldn't really worry about it any further because you'll just break it more. Honestly though, you're probably fine. For now.
|
# ? Mar 21, 2016 20:37 |
|
McGlockenshire posted:You're probably actually OK, as long as all the defaults present on the machine you're importing to are identical to the original. Aha! Thanks so much. This helped me figure out what I was doing wrong. I was copying the tables I needed from dump.sql into a new file and setting the encoding as utf-8 and couldn't figure out why it wasn't importing into mysql properly. But actually I should have been setting the encoding as latin-1, to keep the same sequence of bytes, then importing to mysql as utf-8. Counter intuitive but makes sense I guess. Crisis averted
|
# ? Mar 21, 2016 21:58 |
|
The Merkinman posted:Yeah that was my EDIT: For anyone else attempting something similar. I had to change this a little. It seems that Safari (OSX and iOS) in Private Browsing mode do not support local/session storage even though it says it does. Basically you need to do a try/catch.
|
# ? Mar 22, 2016 16:19 |
|
I'm trying to come up with a good fit for a grid layout framework for using with React. I like the idea of react-flexbox-grid, but I'm just seeing if anyone is using anything else that they particularly like working with when using React. Of course, there's nothing preventing me from just using divs and css and using any of the myraid css grid frameworks...I'm just exploring my options. Because I'm not a designer I usually use react bootstrap, but I don't want to use bootstrap styling on this project. I mean, I could just use react-bootstrap for the grid, but that seems like a waste.
|
# ? Mar 24, 2016 15:06 |
|
I showed my CSS grid guide to Chris Coyier and he liked it so much he had me port it over to CSS Tricks. Rad.
|
# ? Mar 26, 2016 02:48 |
|
What options do web developers have for obfuscating their personal information when signing up for a service like Stripe? They asked for my address and phone number before I could activate my account so I put my personal information in there. But if this info is going to show up on customers' statements I'd much rather use a non-personal phone number and address for that. I'm not trying to use fake info or anything, since I'm sure that'd get my account closed.
|
# ? Mar 27, 2016 08:40 |
|
caiman posted:I showed my CSS grid guide to Chris Coyier and he liked it so much he had me port it over to CSS Tricks. Rad. That's really nice and comprehensive. One tiny addition - in FF 46+ I am still seeing some sizeable missing features (e.g. grid items not 'clearing' to completely contain their contents, even with the layout.grid.enabled switched on). Dunno if you want to mention that under Broweser Support, or whether it's all too early to care.
|
# ? Mar 27, 2016 10:39 |
|
That grid system is really slick, nice job + congratulations. How popular / current is Expression Engine? I'm starting a new job soon, and they use EE quite a bit. I'm coming from a WP background and am really impressed with it so far. Is it still commonly used, or has everyone jumped to Craft or something?
|
# ? Mar 27, 2016 11:08 |
|
Sergeant Rock posted:That's really nice and comprehensive. I also know that Chrome 49 doesn't support grid-gap and possibly some other stuff. I think I'll leave out mentioning the missing features while support is still behind flags. It's just liable to change so often that I don't think I'll be able to keep up. But once browsers officially support grid it'll be important to note the differences.
|
# ? Mar 27, 2016 17:51 |
|
Probably more server related than web development/design but are there any practices for identifying/removing unused uploaded files from a site? A few sites I manage are getting quite old now and take up more and more server space as content is updated. As far as I can tell while they allow the uploading of new files, old files are never removed so they just accumulate. Is there a best practice way to clean this up?
|
# ? Mar 29, 2016 14:22 |
|
nexus6 posted:Probably more server related than web development/design but are there any practices for identifying/removing unused uploaded files from a site? A few sites I manage are getting quite old now and take up more and more server space as content is updated. As far as I can tell while they allow the uploading of new files, old files are never removed so they just accumulate. You can write a php script to find files and their access times. If a file hasn't been accessed in over XX number of days, you can remove it. http://php.net/manual/en/function.fileatime.php Also, via linux command line: http://www.cyberciti.biz/faq/howto-finding-files-by-date/ There's no magic solution, you're going to have to script something. No matter how you do it, take a backup first. There will ALWAYS be a file that someone needed but didn't know it until it was gone. I've worked with people that used the Windows Recycle Bin as a place to store files they don't want deleted. DarkLotus fucked around with this message at 14:31 on Mar 29, 2016 |
# ? Mar 29, 2016 14:29 |
|
I have a project which entails having a content slider load content asynchronously on slide change/swipe. I'm thinking "not a big deal" but the client says the # of slides may be in the hundreds (trying to talk her down). If I were to go through with her plan how would I attack this? I twas thinking of appending a new slide every time I hit the end, but that will probably be a performance suck as I swipe along (I believe even removing the front slides as I swipe along would not help performance. Could be wrong). Was also thinking maybe I just leave the thing as 3 slides (prev, current, next) and update all 3 on swipe?
|
# ? Mar 30, 2016 15:12 |
|
Boosh! posted:Was also thinking maybe I just leave the thing as 3 slides (prev, current, next) and update all 3 on swipe? This'll be the least abusive to client resources and bandwidth, though you'll probably want to load a few more than just three. Consider talking the client into a filmstrip of thumbnails below the slider, for easier navigation.
|
# ? Mar 30, 2016 17:45 |
|
caiman posted:I showed my CSS grid guide to Chris Coyier and he liked it so much he had me port it over to CSS Tricks. Rad. This was really helpful. I have one thing I'm not clear on though, and forgive me if this should be obvious, I'm super new at css: Say I use grid-template-areas to define a header to be my top row, how do I then have a thing fill that space?
|
# ? Mar 30, 2016 19:32 |
|
HoboMan posted:This was really helpful. I have one thing I'm not clear on though, and forgive me if this should be obvious, I'm super new at css: So let's say your HTML looks like this: code:
code:
|
# ? Mar 30, 2016 19:50 |
|
Boosh! posted:I have a project which entails having a content slider load content asynchronously on slide change/swipe. I'm thinking "not a big deal" but the client says the # of slides may be in the hundreds (trying to talk her down). If I were to go through with her plan how would I attack this? http://shouldiuseacarousel.com/ That being said, your plan makes a lot of sense. If you have a way to implement it, could I suggest doing the two next slides? People often zip through those things very quickly.
|
# ? Apr 1, 2016 12:09 |
|
I have a question about backend things. What is the best way to serve an angular app that uses a mongo database? Should I be using express to serve the content of the whole app, or should I be using something like nginx as a reverse proxy? I know how to do it both ways and am interested in hearing some opinions about leading practices
|
# ? Apr 1, 2016 19:32 |
|
ModeSix posted:I have a question about backend things. The question of how to host your assets for an SPA (Angular, React or whatever) shouldn't really depend upon the framework. You're hosting static assets, and any webserver will do. Probably shouldn't be hosting anything from Express directly, nginx should go in front of that. The only time a web server should matter is considering what to write your API in, or if you want to use some of the pre-rendering features in Angular or React for faster initial page loads. I short: Using Express directly is a bad practice, put nginx in front.
|
# ? Apr 1, 2016 19:39 |
|
Skandranon posted:The question of how to host your assets for an SPA (Angular, React or whatever) shouldn't really depend upon the framework. You're hosting static assets, and any webserver will do. Probably shouldn't be hosting anything from Express directly, nginx should go in front of that. The only time a web server should matter is considering what to write your API in, or if you want to use some of the pre-rendering features in Angular or React for faster initial page loads. Great, this is exactly what I was looking for. Yes, sorry, I meant an angular app running through express. Right now I have nginx as a front end and express running behind it, not directly accessible. Nginx is handling all the static content and when it can't find a static resource it reverse proxies to express to get it if it can. I've also just discovered loopback server (aka Strongloop). Oh I love it for setting up the basic routes and then manually extending them, seems to be saving me a lot of time. And I also noticed it has some other nice functionality built in as well. ModeSix fucked around with this message at 19:46 on Apr 1, 2016 |
# ? Apr 1, 2016 19:43 |
|
Are site templates a thing people use? I want to make a simple static site for my mom's business but would rather not start from scratch. I'm not completely clueless as I'm working on a WebGL project right now, but actual design with CSS and stuff isn't exactly my strong side. Not many requirements, really, just reasonably modern looking and work decently on the phone. Oh, and free .
mobby_6kl fucked around with this message at 20:19 on Apr 1, 2016 |
# ? Apr 1, 2016 20:17 |
|
mobby_6kl posted:Are site templates a thing people use? I want to make a simple static site for my mom's business but would rather not start from scratch. I'm not completely clueless as I'm working on a WebGL project right now, but actual design with CSS and stuff isn't exactly my strong side. Not many requirements, really, just reasonably modern looking and work decently on the phone. Oh, and free . You could set her up on a basic WP install with a free theme (there are thousands). Or if she's willing to pay just a little bit, Squarspace. It's not expensive.
|
# ? Apr 1, 2016 20:29 |
|
I was going to say, paying $8 a month for SquareSpace is better than spending your time on it.
|
# ? Apr 1, 2016 20:32 |
|
Save yourself the headache of the weekly "HEY I NEED THIS WORD CHANGED ON THE SITE" phone call and get her something like squarespace.
|
# ? Apr 1, 2016 21:22 |
|
ModeSix posted:I have a question about backend things. As said before, nginx for files, and have it proxy everything else. It's the Right Thing to do.
|
# ? Apr 1, 2016 22:05 |
|
Hearing "Squarespace" triggers me but I get the point, thanks everyone. I'll see if something like this would work for the purpose.
|
# ? Apr 2, 2016 07:55 |
|
Squarespace is actually really good for what it is.
|
# ? Apr 2, 2016 13:58 |
|
Oh I don't doubt, it's just that when I used to listen to podcasts, inevitably one of the hosts would launch into a terrible "let me tell you about Squarespace..." pitch at the worst possible moment. It's certainly something I'll consider, though as the site needs to be only very simple, basically a single page to tell what the business is and how to get in touch, setting up WP would be complete overkill.
|
# ? Apr 2, 2016 18:23 |
|
mobby_6kl posted:Oh I don't doubt, it's just that when I used to listen to podcasts, inevitably one of the hosts would launch into a terrible "let me tell you about Squarespace..." pitch at the worst possible moment.
|
# ? Apr 3, 2016 00:56 |
|
mobby_6kl posted:Oh I don't doubt, it's just that when I used to listen to podcasts, inevitably one of the hosts would launch into a terrible "let me tell you about Squarespace..." pitch at the worst possible moment. You could get literally the easiest and worst thing ever and use GoDaddy site builder. I think it's about $20 a year, if that.
|
# ? Apr 3, 2016 03:10 |
Is there anything new in admin frameworks? I make mobile apps for tracking and saving stuff through an API and clients normally need a way to either create or edit whatever resources the app uses. I have been using ActiveAdmin because it's what my previous job used and it's fairly easy to make it client-usable. Would Django be better? What about something like KeystoneJS? My main requirement is that it doesn't look like rear end and doesn't take forever to setup since they are just CRUD apps. JS would be nice since that's what I use the most but not a deal breaking thing (I'm already using Ruby for ActiveAdmin ). EDIT: I forgot to mention that whatever system I use for the administration is the one that'll be used for actually setting up the API. Right now RoR is the one providing the JSON endpoints. lunar detritus fucked around with this message at 18:08 on Apr 3, 2016 |
|
# ? Apr 3, 2016 18:00 |
|
|
# ? May 10, 2024 12:34 |
|
I've got like 10x the experience with Django as I do with ActiveAdmin, but from where I stand they're fairly equivalent. However, the general consensus, at least here on SA, seems to be that Ruby(Rails) is declining in relevance/popularity/goodness/stuff-in-this-kinda-concept-space. I don't know how true that is as I don't use Ruby any more... Basically what I'm saying is that you're probably alright with either Django or ActiveAdmin. Personally I try to avoid node just because the ecosystem is so immature. (see recent episode where one guy unpublished his little dozen-line package and like a bajillion projects broke because they depended upon it).
|
# ? Apr 3, 2016 18:20 |