This file is a generic skeleton of the form necessary to fulfill email-for-media widgets. This file is self-contained and contains the various states that need to be handled. It is supplied in a minimal form to allow you to customize the appearance however you may need. The file has three major areas that are noted by the placement of comments in the PHP code.
I. CHECK FOR FORM SUBMISSION AND AUTHORIZE IF PRESENT The PHP file first checks to see if it is loading with a submitted form value or not. This is done by checking to see if there is a posted campaign form value. If this value exists, the form then gets the rest of the form values and makes a request to Topspin's servers to see if the submitted data is authorized to retrieve a track. If the data is valid, then the user will immediately start downloading the media file(s) you associated with this campaign. If the data is not valid, they will be presented with the screen detailed in Section II.
II. PRESENT ERROR PAGE This page is provided in a minimal form to catch the invalid data error case detailed in Section I. This page can be skinned freely to match the design of your site. We do recommend keeping the link to Topspin Customer Support so that any customer questions specific to the fulfillment path can be directed to Topspin. Users will most likely see this page if they have an invalid or expired redemption code.
III. CONFIRM AND DOWNLOAD PAGE The final section is actually the first section seen by most users. As with Section II, this page is provided in the most minimum form possible so that you may have the most freedom possible to reskin this page.
This page contains a form that posts to this same file (email.php) for processing the form. There are two hidden fields - fan and campaign, which are populated with values from the URL's query parameters. Do not change this section!
The <input type="image"> section of the form is the Submit button for this form. Feel free to change the src="" attribute to point to an image on your server that is more appropriate to your site's design.
***PLEASE NOTE*** If you change the name of this file (e.g. to "download.php"), you will need to change the action="" attribute of the form in Section III to reflect the new filename.
For example, if you changed the filename to download.php, you would change line 51 from:
<form action="email.php" method="POST">
<form action="download.php" method="POST"> as this file posts to itself.
This file can be renamed as needed and placed anywhere -- it is self- contained (mostly). See the usage section for email.php for more details on what needs to be done to skin and rename this file. You may also use one copy of this file to fulfill multiple email-for-media campaigns.
Q. Where does the email.php file go? A. It can go wherever you want it on your website. It is formatted to be a self-contained unit.
Q. Can I rename email.php? A. Yes -- please keep the .php extension. If you change the name of the file, you will need to change the <form action=""> tag in email.php to correspond with the new name of the file.
Q. Can I use one email.php for multiple campaigns? A. Yes -- you'll just use it as the target URL for email-for-media campaigns. The file and Topspin's servers will know which media file to give to your fans and all logging will be assigned to the correct campaign.
Q. Can I use multiple email.php files skinned differently? A. Absolutely. You can either use several files in the same directory with different names -- e.g. /campaign/new_track_promo.php /campaign/summer_tour.php /campaign/studio_preview.php (just remember to change line 51) or you can place them in different directories, e.g. /summer_tour/email.php /studio_preview/email.php /new_track_promo/email.php
Q. Is this file available in other formats? A. Currently, we've only developed the PHP file.