<HTML>
<HEAD>
<TITLE>Web Review</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
<!--
var cookie = document.cookie + '';
var expdate = new Date();
expdate.setTime (expdate.getTime() + 31536000000);
function getCookie(name){
var fname = name + "=";
var dc = cookie;
if (dc.length > 0) {
offset = dc.indexOf(fname);
if (offset != -1) {
offset += fname.length;
var end = dc.indexOf(";", offset);
if (end == -1) end = dc.length;
return unescape(dc.substring(offset, end));
}
}
return null;
}
function setCookie(name, value) {
document.cookie = name + "=" + escape(value) +
"; expires=" + expdate.toGMTString() + "; path=/";
}
function getChip(name){
var cn = name + '=';
var dc = getCookie(logName);
if (dc != null) {
var start = dc.indexOf(cn);
if (start != -1) {
start += cn.length;
var end = dc.indexOf('|', start);
if (end != -1) return unescape(dc.substring(start, end));
}
}
return null;
}
function setChip(name, value) {
var dc = getCookie(logName);
var cv = getChip(name);
var cn = name + '=';
if (cv != null) {
var start = dc.indexOf(cn);
if (start != -1) {
var end = dc.indexOf('|', start);
setCookie(logName, dc.substring(0, start) + cn + value + '|' + dc.substring(end + 1, dc.length));
}
}
else {
if (dc != null) dc += cn + value + '|';
else dc = cn + value + '|';
setCookie(logName, dc);
}
}
function delChip(name) {
var dc = getCookie(logName);
var cv = getChip(name);
var cn = name + '=';
if (cv != null) {
var start = dc.indexOf(cn);
var end = dc.indexOf('|', start);
setCookie(logName, dc.substring(0, start) + dc.substring(end + 1, dc.length));
}
}
// get a channel value
function getChannel(channel) {
// get channels off cookie
var channels = getCookie('wr_channels');
if (notEmpty(channels)) {
// find the placement, and then value, of the channel's importance in the channel cookie
var importance = parseInt(channels.substring(channel - 1, channel));
// if the importance is 0, then return null, otherwise return value
return ((importance == 0) ? null : importance);
}
else return null;
}
// get the best channel
function getBestChannel() {
var channel = null;
for (var j = 5; j > 0; j--) {
for (var i = 1; i < 6; i++) {
if (getChannel(i) == j) channel = i;
}
for (var i = 0; i < articles.length; i++) {
if (articles[i].code == channel) return channel;
}
}
return null;
}
// detect if something is not null or nothing; return true
function notEmpty(value) {
return (value != null && value.length != 0);
}
// mark article as read
function makeArticleRead(logId) {
setChip(logId, 'true');
}
// is article read ?
function isArticleRead(logId) {
return (getChip(logId) == 'true');
}
// get rid of old article logs, they take up space
function purgeOldRead() {
var tempLog = '';
for (var i = 0; i < articles.length; i++) {
var tempArticleLog = getChip(articles[i].logId)
tempLog += ((tempArticleLog == null) ? '' : articles[i].logId + '=' + tempArticleLog + '|');
}
setCookie(logName, tempLog);
}
var logName = "wr_new_log";
// compile article
function compileArticle(id) {
var article = articles[id];
var articleString = '<P>';
if (article.code < 7) {
if (getCookie('wr_new') == 'true' && !isArticleRead(article.logId)) articleString += '<IMG SRC = "/universal/images/new.gif" BORDER = "0">';
articleString += '<A HREF = "' + article.url + '" TARGET = "_parent" onClick = "makeArticleRead(' + article.logId + ')">' + '<B>' + article.title + '</B></A><BR>' + article.description;
}
else if (article.code == 7) articleString += '<A HREF = "' + article.url + '" TARGET = "_parent" onClick = "makeArticleRead(' + article.logId + ')">' + article.title + '</A><P><CENTER><FONT SIZE = "-1"><B>' + '<A HREF = "' + article.url + '" TARGET = "_parent" onClick = "makeArticleRead(' + article.logId + ')">' + article.description + '</A><BR></B></FONT></CENTER>';
return articleString;
}
function compileContent() {
var bestChannel = getBestChannel();
var bestArticles = new Array();
var contentString = '<TABLE WIDTH="525" BORDER="0">' + '<TR>' + '<TD WIDTH="5" VALIGN="TOP">' + '<IMG SRC="/universal/images/blank.gif" ALT="" HEIGHT=7 WIDTH=7>' + '<TD WIDTH="200" VALIGN="TOP">';
for (var i = 0; i < articles.length; i++) {
if (articles[i].code == 7) contentString += compileArticle(i);
}
contentString += '<TD WIDTH="20" VALIGN="TOP">' + '<IMG SRC="/universal/images/blank.gif" ALT="" HEIGHT=20 WIDTH=20>' + '<TD WIDTH="300" VALIGN="TOP">' + '<FONT SIZE = "-1"><B>' + date + '</B><P>';
if (notEmpty(getCookie('wr_channels'))) {
var totalArticles = 0;
// find new spotlight articles
for (var i = 0; i < articles.length; i++) {
if (articles[i].code == bestChannel && (!isArticleRead(articles[i].logId) || !notEmpty(getCookie('wr_new')) || getCookie('wr_new') == 'false')) {
bestArticles[totalArticles++] = compileArticle(i);
}
}
// compile new spotlight articles
if (totalArticles > 0) {
contentString += '<FONT SIZE = "-1"><B>' + (!notEmpty((getCookie('wr_name'))) ? 'Your' : getCookie('wr_name') + '\'s') + ' Spotlight:</B>';
for (var i = 0; i < bestArticles.length; i++) {
contentString += bestArticles[i];
}
contentString += '<P><B>Other Articles This Week:</B></FONT>';
}
}
// find and compile new non-spolite articles
if (getCookie('wr_new') == 'true') {
for (var i = 0; i < articles.length; i++) {
if (articles[i].code != bestChannel && articles[i].code != 7 && !isArticleRead(articles[i].logId)) {
contentString += compileArticle(i);
}
}
}
// compile the rest of the articles
var totalArticles = 0;
for (var i = 0; i < articles.length; i++) {
if (((getCookie('wr_new') == 'true' && isArticleRead(articles[i].logId)) || ((!notEmpty(getCookie('wr_new')) || getCookie('wr_new') == 'false') && articles[i].code != bestChannel)) && articles[i].code != 7) {
contentString += compileArticle(i);
}
}
contentString += '</FONT></TABLE>';
return contentString
}
function makeArticle(ti, ur, de, co, da, id) {
this.title = ti; // title of article, for feature it's a graphic
this.url = ur; // url of article
this.description = de; // description of article
this.code = co; // channel code of article (see channel code comments)
this.date = da; // date (yymmdd) of article
this.id = id; // the id (or index) relative to total number of articles
this.logId = da.toString() + id.toString(); // article id in log
}
function newArticle(ti, ur, de, co, da) {
articles[index] = new makeArticle(ti, ur, de, co, da, index);
index++;
}
var articles = new Array();
var index = 0;
// Get the date
var day = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
var mon = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var now = new Date();
var date = day[now.getDay()] + ', ' + mon[now.getMonth()] + ' ' + now.getDate() + ', 19' + now.getYear();
// Channel Codes
// Business : Code 1
// Design : Code 2
// Diversions : Code 3
// Programming : Code 4
// Technology : Code 5
// Universal : Code 6
// Feature : Code 7
// To put articles in "Database", use the following format:
//
// newArticle (
// '[Title Here]',
// '[URL Here]',
// '[Description Here]',
// [Channel Code Here],
// [Date in YYMMDD]
// );
//
// For feature, use image as title.
newArticle (
'<IMG SRC="/97/04/18/graphics/cover-970418.gif" ALT="The Best of Push" HEIGHT=250 WIDTH=200 BORDER="0">',
'/97/04/18/feature/index.html',
'Players come and go quickly, but these five Push vendors may have found promising niches in the marketplace.',
7,
970418);
newArticle (
'Push Theme',
'/97/04/18/push/index.html',
'An index of Web Review articles on Push.',
6,
970418);
newArticle (
'Web Architect: Look Before You Push',
'/97/04/18/arch/index.html',
'Consider the user before taking the plunge.',
2,
970418);
newArticle (
'Web Addict: Netscape\'s Netcaster',
'/97/04/18/addict/index.html',
'Convert your Web site into an instant channel.',
5,
970418);
newArticle (
'Web Coder: Dynamic HTML',
'/97/04/18/coder/index.html',
'Create objects that let you modify pages on the fly.',
4,
970418);
newArticle (
'UNIX Tips: Scripting with sed',
'/97/04/18/programming/unix.html',
'Write a sed script for searching and replacing text.',
4,
970418);
newArticle (
'Win a Copy of Vibe',
'/contest/visix/index.html',
'Tell us how you would use this Java development tool.',
4,
970418);
newArticle (
'Internet (Happy) Hour',
'/97/04/18/hour/index.html',
'The best cocktail sites online.',
3,
970418);
newArticle (
'Unreal Sites Talkin\' \'bout My Generator',
'/97/04/18/unreal/index.html',
'Never make up your own excuses again. ',
3,
970418);
newArticle (
'The B.A.D. Place',
'/universal/previous/bad/index.html',
'A new way to look at our Boss Animations of the Day.',
6,
970418);
// for good housekeeping, remove all old logs if article logging is on.
if (getCookie('wr_new') == 'true') purgeOldRead();
//-->
</SCRIPT>
</HEAD>
<BASE HREF = "http://www.webreview.com">
<BODY BGCOLOR="#FFFFFF" BACKGROUND="/universal/images/whiteshadow.gif">
<IMG SRC="/universal/images/header-week.gif" ALT="This Week in Web Review" HEIGHT=30 WIDTH=1500>
<SCRIPT LANGUAGE = "JavaScript">
document.write(compileContent());
</SCRIPT>
<BR>
<HR ALIGN=LEFT NOSHADE SIZE="1" WIDTH="459"><BR>
<TABLE WIDTH="479" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="24">
<TR>
<TD WIDTH="10" VALIGN="TOP">
<TD WIDTH="200" HEIGHT="17" VALIGN="TOP">
<H3><FONT SIZE=+0>Elsewhere in Web Review:</FONT></H3>
<FONT SIZE="-1">
<P>
<A HREF="/97/04/11/feature/index.html" TARGET="_parent">
<IMG SRC="/universal/images/icon-siegel.gif" ALT="4/11 feature"
BORDER="0" ALIGN="right" HEIGHT="80" WIDTH="60" HSPACE="8" VSPACE="5"><BR>
<B>The Web Is Ruined and I Ruined It.</B></A><BR>
Do killer Web sites subvert everything good and pure about the Web?
<P>
<A HREF="/97/04/11/edge/index.html" target="_parent">
<B>The Bleeding Edge</B><br></a>
The battle for strong encryption rages on.
<P>
<A HREF="/97/04/04/trends/index.html" target="_parent">
<B>Trends.com<br></a></b>
Half a Billion Dollars Worth of Push?
<P>
<A HREF="/97/04/04/addict/index.html" target="_parent">
<B>Web Addict: Mapping Chaos</B><br></a>
Tools for Envisioning Information.
<P>
<A HREF="/97/04/04/business/track.html" target="_parent">
<B>Tracking Success<br></a></b>
Defining Terms for Tracking Web Site Usage.
<P>
<b><font color="FF0000"><I>Beta Testbed Contest Results!</I></font></b><br>
<A HREF="/97/04/04/testresp.html" target="_parent">
<B>Readers' Review of Backstage Internet Studio 2<BR></A></B>
Read the review that caught our editor's attention.
<P>
Also...
<ul>
<LI>
<A HREF="/97/04/11/studio/index.html" target="_parent">
<B>Studio: Getting Loopy with Shockwave<br></a></b>
<LI>
<A HREF="/97/04/04/arch/index.html" target="_parent">
<B>Web Architect: To Link or not to Link<br></a></b>
<LI>
<A HREF="/97/04/11/webtech/index.html" target="_parent">
<B>Programming Web Games in C<br></a></b>
(from <i>Web Techniques</i>)
<LI>
<A HREF="/97/04/11/lanmag/index.html" target="_parent">
<B>The Distributed Object Primer</B></A><BR>
(from <i>LAN Magazine</i>)
</ul>
</FONT>
</TD>
<TD WIDTH="10" VALIGN="TOP"></td>
<TD WIDTH="13" VALIGN="TOP">
</TD>
<TD WIDTH="246" VALIGN="TOP"><P>
<FONT SIZE="-1">
<a href="/universal/resources/index.html" TARGET="_parent">
<IMG SRC="/universal/images/icon-resource.gif" ALT="Design Resources"
HEIGHT="80" WIDTH="60" ALIGN="RIGHT" BORDER="0"></a>
<A HREF="/universal/resources/index.html" target="_parent">
<B>Web Design Resources<br></b></a>
Suzanne Stephens has gathered an exhaustive
list of resources for Web designers, everything
from ASCII art to Web stat programs.
<p>
<B><I>NEW BOOK!<BR>
</I></B>
<A HREF="http://webreview.com/books/welcome.html">
<IMG SRC="/universal/images/icon-shock.gif" ALT="Shockwave Studio"
HEIGHT="80"
WIDTH="60" ALIGN=right BORDER="0"></A> <B><A
HREF="http://webreview.com/books/welcome.html">Shockwave Studio:<BR>
Designing Multimedia for the Web</A></B><BR>
by Bob Schmitt<BR>
The latest book from Songline Studios takes users from creating simple
time-based
Shockwave animations through writing complex logical operations.</P>
<P>
<A HREF="/universal/previous/audit.html" TARGET="_parent"><B>
Web Review Auditorials<BR>
</B></A>Lynda Weinman on PhotoShop 4.0,<BR>
plus animating type with rolling textures.</P>
<P><A HREF="/universal/im.html"><B>Personalize Web
Review</B></A><BR>
<IMG SRC="/universal/images/im.gif" ALT="Intermind" HSPACE="5" ALIGN="right">
Download Intermind's Communicator and subscribe
to the Web Review columns you like.</FONT></TD></TR>
</TABLE>
</BODY>
</html>