Try_it_and_see
Members
-
Joined
-
Last visited
Reputation Activity
-
Try_it_and_see got a reaction from fisicx in Issue with text areas and line breaks. Differentiating between automatic line breaks and user-entered line breaks@fisicx Thanks. I've created a work around now. By setting the white-space to nowrap, this ignores all of the automatic line breaks but doesn't ignore the user-added line breaks when creating the spans and line divs. So this puts the string with automatic line breaks all into one line and then puts the user-added line breaks into separate lines. Then I run the function again with the white-space set to initial, and this second pass catches the automatic line breaks and puts them into separate lines. So after two passes of the function all of the lines are in separate divs and every character is in a span of its own, which leaves me free to style every single character and line however I want. Works really well!
The reason I needed this is because without each line of text being in separate divs, if you had one large font on the first line, it made every single line big as well. Now I can have a large font on one line and all the other lines are spaced normally.
Here's a screenshot of it working. It's for a customized greetings card website I'm working on. This is just a random test on the inside left of a card. The promising thing is, if you try emulating that on mobile on funky pigeon you'd have a real hard time as it's almost impossible to select single characters. And on moonpig, forget it, you can't even have individual character styling on moonpig, you can only change the styling for the whole block of text. On mine, it's easy to do this. Very happy!
-
Try_it_and_see got a reaction from fisicx in Best way to send hundreds of variables from page to page without taxing the server in PHP (or JavaScript)?Well yes, assuming I can find a printer that can produce a quality card without having to wait 10 minutes, the only thing stopping it from being a success would be marketing. I have a bit put aside for marketing but it's insignificant compared to funky pigeon. One thing on my side though is the fact I can produce motion graphics myself, so I can make an ad but I'll have to pay to get it seen.
Another thing I can do is charge less than funky pigeon. Last time I checked they charge £5.99 plus £1.45 for postage, so that's £7.99 for an A4 card. I could charge at least one pound less than that and still make a decent profit, though I won't know for sure until I get exact figures.
I've also thought about how I can offer a genuine USP but I haven't got the definitive answer yet. I've had a few general ideas.
About local printers, I had a card printed out from Max Spielmann and the quality was really bad. Even their logo on the back of the card was really poor quality, and they charged £5.99 for it. They have a cheek charging that. I'm not sure if they offer an online service. If they don't you'd have to take your photos to them on a device, which is not always ideal.
Most small businesses are competing with the big names. There seems to be hundreds of people selling posters and prints on eBay, a service which big companies offer. The amount of companies offering personalized greetings cards is relatively small compared to other print services, probably because it's expensive to get a website that can do that. If I can get a small piece of that pie there's a small chance it could work. But even if it doesn't it's been a great project to work on and it's helped me through a tough time personally.
-
Try_it_and_see got a reaction from Jo 90 in Best way to send hundreds of variables from page to page without taxing the server in PHP (or JavaScript)?Sorted!
I have now stored my 200+ MySql columns in one JSON MySql column, which is faster to access. These are transferred to client side localStorage when the page first loads and the page is then built in JavaScript. The user's uploaded photos are also stored client side in IndexedDB during customization and will then be transferred to the server if a purchase is made, along with the variables. So the customization process with all the variables and photos is all handled client side now. I'm assuming this is the best way to do it but of course I'll have to wait and see how it all works when on a live server.
-
Try_it_and_see reacted to fisicx in Best way to send hundreds of variables from page to page without taxing the server in PHP (or JavaScript)?Excellent!
post the url when it goes live. Very interested to see your work
-
Try_it_and_see reacted to jpeters8889 in Best way to send hundreds of variables from page to page without taxing the server in PHP (or JavaScript)?You said you're using PHP and MySQL, could you not have a table to store these customisations /settings/variables in as JSON, perhaps with an UUID as the PK, a text or json column type for the settings, and a created_at and updated_at timestamps.
That way you can just keep the UUID in the users session, and then in PHP you can get the settings out of the table, run them through json_decode() and you've got all your settings to use server side and pass to the view layer for the customer.
You could then have a task running on the server regularly to delete settings that are older than X hours to keep the table size low and also avoid storing data any longer than you need to.