Problem Solved; Syndicating Master Quiz Quizzes
It is almost always less expensive to modify an existing similar CGI program than it is to custom build the whole thing.
There are exceptions, of course.
An exception might be when the programmer of the existing program is unavailable to do the modifications. Depending on the extent of the changes and the sophistication of the existing program, the time required for a new programmer to study the program before making changes, plus the time required for subsequent testing, might total more than the time required to custom build the program. New programmers must study and understand the code they are to modify and, because they aren't aware of the idiosyncrasies of the program as the original programmer might be, they must be especially diligent about not introducing additional bugs.
This article steps you through the main modifications made to Master Quiz for additional functionality. It is intended to provide some idea of how modifications are approached by at least one programmer.
Initially, the request to modify Master Quiz appeared to be a quick and easy project. As the specifications evolved, it became clear it was to be a rather sophisticated program.
Quiz Syndication
Master Quiz is really good at what it does. But it doesn't syndicate quizzes.
http://traffic-test-tube.com/ needed to syndicate a search engine ranking quiz to remote web sites.
This should be rather quick, I thought, when I initially received the inquiry. After all, I've written a number of syndication scripts, including one to syndicate web pages generated by CGI programs. Adapting one of those might do the trick.
As more emails were exchanged and specifications developed, it became clear that the modifications would be more than just adding quiz syndication.
Email Depending On Score, With Custom Affiliate Links
The Master Quiz program version on the Master Series CGI Software web site allows the webmaster to specify which URL to present as a "thank you" web page depending on what the quiz taker's score is.
The modified version needed to be able to send a certain email, instead of a certain "thank you" page. And, note, the email would have custom affiliate links to the owner of the web site where the syndicated quiz was taken.
The section of the script that selects a "thank you" page URL needed to be replaced with code to select an email template file instead. The email template would then be used to generate email sent to the quiz taker.
The control panel was revised, too, for the change from web page URL to email template file.
A new control panel was built for the traffic-test-tube.com webmaster to associate certain placeholders with certain affiliate codes. When outgoing emails are generated from the email templates, the placeholders are replaced with the appropriate affiliate codes.
The modifications for this part of the specifications were:
-
Replace URLs with email template files, so when a quiz is taken the correct email is sent.
-
Modify control panel to specify template file locations instead of URLs.
-
Make a new control panel to associate certain placeholders with certain affiliate codes.
Webmasters of syndicated quiz web sites would need to modify certain hidden fields of their quiz form so the correct affiliate codes would be printed in the outgoing emails.
Email To Quiz Takers Who Are Webmasters
A completely new function was added for the modified quiz program. This function sends an email to the quiz taker if, and only if, a checkbox on the quiz form is checked indicating the quiz taker is a webmaster. The email would invite the webmaster to syndicate the quiz and provide instructions for doing so.
New Subscriber Information Database
Those who take the syndicated quiz are subscribed to a related ezine. Therefore, a database of subscribers needs to be maintained. This was another new function for the modified quiz program.
The new control panel now includes a place where the location of the subscriber database can be specified.
Optional Autoresponders
From time to time, the syndicated quiz might be offered along with certain information delivered by autoresponder. The new control panel, then, also allows the addition and removal of autoresponder addresses.
Banned Email Addresses
Because the traffic-test-tube.com webmaster may decide not to deliver quizzes or allow subscriptions at certain email addresses, they can be added into an area of the new control panel. The email addresses can be individual addresses such as name@example.com or entire domains such as @example.com
The new control panel also provides a place to provide the message to present when a banned email address is used.
The Result
Have a look at the result. It's at Traffic Test Tube
Take the quiz, if you wish. And if you wish to see what the syndication instructions look like, make sure you check the "I am a webmaster" checkbox before you submit the quiz.
The modified quiz program works exactly as it is supposed to work:
-
Webmasters can syndicate the search engine ranking quiz.
-
Those who take the quiz are sent an email, the content depending on their score.
-
Outgoing email to quiz takers carry the affiliate links of the webmaster syndicating the quiz.
-
A subscribers database is updated.
-
Quiz takers may optionally be provided with autoresponse content.
-
Banned email addresses are not accepted.
It was a fun project.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©2003 Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.