|
|
 |
Program the Script
Once you have the page prepared, you are ready to create the HTML code that calls the Perl script used by the News Release System to generate dynamic news content.
The following steps will demonstrate how to form this code:
-
Include the script. In your page, where you have selected to embed the news, insert the code that points to the Perl script "generic.pl".
Type #include virtual="/htbin/newsreleases/generic.pl? into the page.
-
Select the number of releases. This script will display any number of the most recent news releases you select. Here, you must supply any number, from 1 to 50 to display on your page. If the number is higher than the number of releases available in the set you select, it will display all those available.
Add releases=** to the code you inserted, replacing ** with the number of releases you want the page to display.
-
Select the set of releases you want to display. Here you tell the script what college or category you want to select from.
If you want to select the releases from a particular school, type &college=***, replacing *** with the three-letter college code.
Alternately, if you want to select the releases from a category, type &category=****, replacing **** with the category code.
Also, if you do not wish to select a set of releases, merely skip this step entirely.
-
Select your template. As a final step, you need to tell the News Release System that you want to use your templates to display news releases. Here you supply the template group name you were given by NIS when you received your templates.
Type &template=***", replacing *** with the name you were given. Do not omit the final ", or the script will not work.
You should now have a line of code in your HTML file that looks like this:
#include virtual="/htbin/newsreleases/generic.pl?releases=XX &college=YOURSCHOOL&templates=YOURTEMPLATES"
or,
#include virtual="/htbin/newsreleases/generic.pl?releases=XX &category=CATAGORY&templates=YOURTEMPLATES"
Once you have included this line of code in your page, in the place you selected, save your work.
Upload the new page to the server, and view the results in your browser. The page will now dynamically serve news content.
|