Archive for the “Coding” Category

Yesterday, Laurel’s best friend Meg celebrated the 1st birthday (or blogiversary, if you will) of her blog by posting some results of her playing around with the Advertising Slogan Generator. I found this lovely device to be quite amusing, so I decided to see if I could incorporate its cutting-edge technology into my website. The little welcome message on the home page was getting old anyway. After poking around in the HTML of the ASG for a short while I discovered a hidden command that would cause it to print out all the base slogans that it works with. With this vast database in my possession, I fired up BBEdit Lite to see what kind of Perl script I could come up with to suit my needs. Also, I was really worked up after having been reading A Theology for the Social Gospel by Walter Rauschenbusch all day, so pounding out some code seemed like a good way to release my frustrations.

I started with examining the script that handles my random quote display in order to figure out how to randomly select a line from a text file. Then it was off to to figure out how to substitute text. Finally, I had to consult the script that used to run my poll, and HTML Goodies to figure out how to process any customization data sent to the script through the URL. After putting all the pieces together, the Steverized Random Ad Slogan Generator was born. However, that’s not all. In the final step described above I added some hidden functions that can allow others to send commands to the script that customize its output so that they can use it on their site as well. If you’d like to incorporate customized random ad slogan generation technology on your site, just ask and I’ll send you the instructions for using the script.

Comments 2 Comments »