Two in one day! These posts are mainly helping me remember things down the road. Like the Local host one. I have re-visited that post so freakin’ often.
Yes, yes I’ve been neglecting my own site. Yes, I’ve been busy. Yes, I’ve still been training. Yes, Roxie keeps
Hey everyone! This is yet another web dev post and this is gonna be quick and dirty.. It’s regarding Laravel
Ever needed away to detect when a user copies and pastes something into your web application? I ran into this scenario where people were coping and pasting from Microsoft Word and when I tried to export the information using PHPWord, it would corrupt. Now, most of the special MS Word characters I was able to figure out how to replace when I was running the export except bullet points. They were going to be the death of me. I came up with another solution before the export. What if I run a check to see if bullet points were pasted in a textarea??
I can’t take credit for this, but I wanted to share this quick PHP tip (and make sure I have it for later too of course). Ever run into a situation where you needed to alphabetize a multidimensional array by one of the inner values? Well I have and I found the solution based on a StackOverflow (PROGRAMMER’S BEST FRIEND) thread.
This is a follow up to PHPWord I wrote a blog about I wrote last year. I’ve had to use it a couple different times since then. While this plugin is pretty powerful, there are a few kinks that need to be worked out–especially if you are exporting a lot of text that was put in by users. I have been known to say that sometimes developing is like being a psychic. You need to prep the site in how you feel like the users should put in the information. Sometimes I’m good at it. Sometimes I’ve failed. This time, I didn’t think something through while programming a form.
PHP can be fickle at times. Especially with dates. I ran into a situation at work where I needed to
I’ve been wanting to share this tip for awhile. It’s going to be short though.
Ever wanted to make a file a little more secure by adding a password? It’s easy to do on a LINUX server. All it takes is one line of code.
I know, I know. I’ve been absolutely terrible about updating. My running days have been rough. I’m nursing a knee injury that I’d rather take care of and not have come back. I managed to knock off 12 minutes off my 10K PR though in a race about a month ago! I was very excited about that.
Anywho, this post is not about running. It’s about something I learned at work. I have been developing an application that spits out a filled Word document. Not only that, I had a template I wanted to use as well. What to do? Enter PHPWord. It’s a PHP class that allows you to create brand new Word documents, use a template, add images. All this without having to open Microsoft Word. The zip file from Github has a gazillion examples. The issue I was having was trying to add an image to the template. I ran into this StackOverflow form post. If you add the code they provide to the Template.php, this gives you the ability to replace an image placeholder in the document. They even give you this code bit on how to use it:
For the life of me, I can’t remember if I mentioned this or not, but I started a new job! I’m a week and a half into it and really enjoying it. It’s a little different than what I was doing before. I was more Front End Developer. Now I’m much more Back End. Getting my hands dirty with OOP PHP and mySQL. It’s been really tough, but I am stepping up to the challenge. The company is very supportive and much (much) bigger. I’m surrounded with a bunch of other geeks (aka developers).
…and actually read the stinkin’ error code while you’re at it!
If you haven’t noticed by now, I am blonde. Yep! Guilty as charged. It also doesn’t help that I’ve always had this bad habit of skimming. Yes. I know about it. No, I’m not great at fixing this issue. I’ve done it forever.
Yay my first web post! Too bad it’s a vent. Hee hee.
Note to web developers: We are no longer in the 90’s anymore. Freakin’ do not disable right clicking for your viewers! It’s extremely annoying. I get why it was done in the 90’s. No one wanted hotlinking of images so their bandwidth gets maxed. It makes sense…then.