Me and Koji currently live in Istanbul – she’s studying in a univeristy here – and since most of the guests for our wedding live in Bulgaria and some live in USA, sending-out invitation cards via the postal services would be somewhat inefficient and slow. So we decided to make web-based invitations. We looked for an already working solution, but we couldn’t find anything that we liked.
Since I’m more-or-less a computer(well mostly WordPress) geek, I decided that we can make a WordPress-based website that would serve as guests and invitations management application.
So then came the design part. Honestly I’m not good at designing a complete product(well I’ve never tried to make a complete design of something, but I’m pretty sure it won’t turn out really good). So we thought about designers that we know and luckily Koji has a friend that makes designs. She was also one of the first people to know that we’re officially getting married. So we asked her if she’d like to design our wedding invitations. She agreed and we sent her a couple of examples of things that we both like with some ideas that we have. A week or so later(she’s been working on the invitation in her spare time, so that was pretty fast and we really appreciate that! ) she sent us the ready design. Once we got it – we just had no words, because it was really really beautiful and we just fell in love with it right away.
Then came my part – since the design was mainly using custom fonts, I only left the dynamic text(like the guest’s name and labels for the answer) actual text and used the rest as couple of separate images. After all I’m not aiming for high rankings in Google with my invitation, so it’s not a big of a deal that I haven’t done it in a SEO-friendly way
After I’ve done the main stuff, I took care of a couple of some small details – for instance I added a loading animation that would stay there until the whole page is loaded and then fade-out and the invitation would fade-in. I also made the response form submit with AJAX, showing a nice message once it’s submitted.
Now since I’m using pretty permalinks, it’s not super hard to guess a guest’s name and see their invitation(therefore response) on their behalf. To battle that, I added a
longstringofseeminglyranomcharacters is a unique string for each invitation – it’s generated by a long complicated nonce, combined with the post ID of the invitation, which is then hashed using a PHP algorithm. Basically it’s nearly impossible to guess that nonce – it’s more likely that my server will go down because of the too-excessive use of resources than anyone brute-forcing through that.
Basically what happens when an invitation is about to be displayed is that the script checks the
n parameter and compares it with the correct one for this invitation. If it’s missing or it’s not correct – the user gets redirected either to the home page, or to an error page(if it’s defined in the site settings) and doesn’t get to see the invitation. Besides the initial idea, this allows to do one more thing – if I change the nonce(which is not visible anywhere on the site and you need to access the code to be able to see it), all of the invitation links will become invalid – that’s useful if you want to have an exact time until invitation responses should be collected.
Here are a couple of screenshots from the invitation itself:
And last, but not least I want to express my gratitude towards Maria – the designer of our invitations