Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timecode script for online newsrooms

Status
Not open for further replies.

jasonsalas

IS-IT--Management
Jun 20, 2001
480
GU
Hi everyone,

I wrote this script an as intranet app to help my reporters calculate the read-time for their stories. We then use the articles to publish to our site online.

It consists of (1) a form which gathers information about the REPORTER, TITLE, and STORY CONTENT, and then assigns the read-time for the story.

It also works to serve as a conversion tool for speechwriting.

Have fun!


================ SCRIPT.HTM ===========================
<HTML>
<HEAD>
<TITLE>Compose a story</TITLE>
</HEAD>
<BODY>
<h1> Enter the information about your story:
<HR> </h1>
<form action=timecode.asp method=post>
<P> </P>
<P><h3><STRONG>Author:<BR></STRONG>
<!- change the names here to reflect your own team -->
<select size=&quot;1&quot; name=&quot;author&quot;>
<option
selected>Name1</option>
<option>Name2</option>
<option>Name3</option>
<option>Name4</option>
<option>Name5</option>
<option>Name6</option>
<option>Name7</option>
</select></h3>
<P></P>
<P><h3><STRONG> Slug:<BR></STRONG>
<input name=title style=&quot;LEFT: 170px; TOP: 88px&quot; size=&quot;20&quot;> </h3>
<P></P><P>

<STRONG><h3>Input your script body:</STRONG><br><TEXTAREA style=&quot;WIDTH: 550px; HEIGHT: 364px&quot; name=script rows=17 cols=45 size=&quot;60&quot;></TEXTAREA></H3><P>

<INPUT type=&quot;submit&quot; value=&quot;Publish your script&quot;>&nbsp;&nbsp;
<INPUT type=&quot;reset&quot; value=&quot;Clear and start over&quot;>
</form></P>


</BODY>
</HTML>


================ TIMECODE.ASP =========================

<%@ Language=VBScript %>
<HTML><HEAD><title>Timecode for this story</title>
<font face=Arial align=&quot;center&quot;>
<h1>Title: <%= Request.Form(&quot;title&quot;)%></font></h1><br>
<h1>Author: <%= Request.Form(&quot;author&quot;)%></font></h1><br>
<%
Dim strScript, TimeMultiplier, InMinutes
strScript = Request.Form(&quot;script&quot;)
TimeMultiplier = 4 ' Multiplier constant
ReadTime = Len(strScript) * TimeMultiplier
InMinutes = ReadTime/60 ' Converts number of characters to total seconds

' ************************************************************
' Time conversion script which converts the variable InMinutes
' to [MINUTE(s):SECOND(s)] expression. ************************************************************

Dim ConvertToMinutes
Dim ConvertToSeconds
ConvertToMinutes = FormatNumber((InMinutes/60),0,-1)
ConvertToSeconds = (FormatNumber(InMinutes,0,-1,0,-1)) - ConvertToMinutes*60

Response.Write &quot;<h2>Read-time: &quot; & &quot;<font face=Verdana color=tan size=5>&quot; & ConvertToMinutes & &quot;:&quot; & ConvertToSeconds & &quot;</font></h2>&quot;
%>
<P><font size=5>Here again is your script:</font><br>
<h3><%= strScript %></h3><br>
<hr>
</BODY></HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top