Texis Web Script source code for:
/texis/site/demos/javadnews.vs
Note: Click on links to view the documentation for HTML tags
which are special to the Vortex compiler.
<script language=vortex>
<export $id>
<uses demonav=demonav><!--simple look and feel module-->
<TIMEOUT=30>
</TABLE>
<H3>Timeout</H3>
Your request exceeded the time limit. Please try again.
</TIMEOUT>
<entryfunc=init> <!-- init function for every invocation -->
<!-- --------------------------------------------------------------------- -->
<a name=init private>
<sum "%s" $SERVER_ROOT "/texis"><db = $ret> <!-- set the database -->
</a>
<a name=hdr>
<demolook title="Java News Ticker Example">
</a>
<a name=ftr>
</demolook>
</a>
<a name=red><span style="color: red"></a>
<a name=/red></span></a>
<a name=javanews>
<$base="">
<apicp allinear 1>
<$id = >
<sql max = 50 "select id,Headline from stories where Category like $cat and id >'-4 hours' order by id desc"/>
<$count=$#id>
<sandr "\x22" "`" $Headline> <!-- Get Rid of quotes that screw up the java -->
<sandr '\[=!\]+]' "" $ret> <!-- Get Rid of UPI/AP photo data -->
<sandr 'NONTEXT' "" $ret> <!-- Get Rid of UPI/AP photo flag -->
<$Headline=$ret>
<APPLET codebase=/site/demos/java/ code=NavigatorTicker11.class width=550 height=28>
<rand 4 6>
<PARAM name=count value=$count>
<PARAM name=speed value=$ret>
<PARAM name=txtco value=0,0,0>
<PARAM name=bgco value=255,255,255>
<PARAM name=linkco value=0,0,255>
<loop $id $Headline>
<send "<">PARAM name=msg$loop value="...<fmt "%H:%M EST - " $id>$Headline \\$SiteUrlPrefix$url/showit.html">
</loop>
</APPLET>
</a>
<a name=allcats>
<apicp allinear 1>
<apicp alpostproc on>
<sql max=100 "select initcap(Category) cat from stories where Category != '' and Category like '/>>=\alpha{2,}' and Category not in ('unknown','special') order by id desc"/>
<uniq $cat>
<$cat=$ret>
<table>
<loop $cat>
<if $cat ne "">
<tr>
<td align=right><b>$cat:</b></td>
<td><javanews></td>
</tr>
</if>
</loop>
</table>
</a>
<a name=showit public>
<fmt "<!-- at showit %s -->\n" $id>
<hdr>
<sql max=1 "select id,Headline,Category,Keywords,Body from stories where id=$id">
<b><red>Date:</red></b> <fmt "%m/%d %H:%M EST" $id>
<h3 align=center>$Headline</h3>
<p>
<b><red>Category:</red></b> $Category <p>
<b><red>Keywords:</red></b> $Keywords <p>
<sandr "\n=\space+" "<p>" $Body> <!-- do paragraph markup -->
<sandr "!http://=>>www\.=" "http://www\." $ret> <!-- look for URL's -->
<sandr "http://" " <a href=http://" $ret>
<sandr "http:=[\alnum\-/\.]\P+." "><b>HERE</b></a> " $ret> <!-- Hyperlink -->
<send $ret>
</sql>
<ftr>
</a>
<a name=main public>
<title> Java News Ticker Example </title>
<hdr>
<loguser $REMOTE_ADDR>
<userstats $REMOTE_ADDR>
<if $ret gt 5>
<body bgcolor=white>
<h3>You are accessing this code example too frequently</h3>
</body>
<exit>
</if>
<META HTTP-EQUIV=refresh CONTENT=300>
<body bgcolor=white>
<h2 align=center> Texis Java News Ticker Example </h2>
<allcats>
<hr>
These are the most recent wire feed stories organized by category.
You may view the full text of a story by clicking on the Ticker Headline.
<p>
This code example clearly illustrates the power behind the combination of Texis and Java.
<p>
<ftr>
</a>
</script>
The Source Viewer is also a Code Example.
Click Here to see its source.
Copyright © 1992-1999 Thunderstone Software