Example Item Script
<html>
<%
Set MC = Server.CreateObject("MobileChannels.Utilities")
URL = Request.ServerVariables("URL")
DataID = Request.QueryString("DATAID")
Pieces = Split(URL,"/")
ChanID = Pieces(2)
' Get logo and title of channel
TopElem = MC.Locate(ChanID)
ChanTitle = ""
LogoHref = 0
If TopElem Then
ChanTitle = MC.Title(TopElem)
LogoElem = TopElem
LogoElem = MC.Navigate(LogoElem,"INMATCH","LOGO")
Do While LogoElem
LogoStyleElem = MC.Navigate(LogoElem,"INMATCH","STYLE")
If LogoStyleElem Then
If StrComp(MC.Value(LogoStyleElem),"IMAGE",1) = 0 Then
LogoHref = MC.Href(LogoElem)
If LogoHref Then
If MC.HrefExists(LogoHref) Then
Exit Do
Else
LogoHref = 0
End If
End If
End If
End If
LogoElem = MC.Navigate(LogoElem,"NEXT")
If LogoElem Then
LogoElem = MC.Navigate(LogoElem,"MATCH","LOGO")
End If
Loop
End If
Response.Write("<head><title>" & ChanTitle & "</title></head>")
If LogoHref Then
Response.Write("<body><a href=mctp://" & ChanID & ">
<img src=" & LogoHref & "></a><br> <br>")
ElseIf ChanTitle And Len(ChanTitle) Then
Response.Write("<body><a href=mctp://" & ChanID & ">
<h3>" & ChanTitle & "</h3></a>")
Else
Response.Write("<body>")
End If
' Dump article out best we can
ArtElem = 0
If DataID Then
ArtElem = MC.Locate(DataID)
End If
If ArtElem Then
For Blk=0 To 100
Data = MC.Data(ArtElem,Blk)
If Not Data.Count Then
Exit For
End If
For Field=0 To Data.Count - 1
Tag = Data(Field).Tag
Val = Data(Field).Value
Type = Data(Field).Type
If Val And Len(Val) Then
If (StrComp(Type,"Html",1) = 0) Or (StrComp(Type,"Text",1)
= 0) Then
' Output text in standard html
If Tag And Len(Tag) Then
Response.Write("<b>" & Tag & ": </b>")
End If
Response.Write(Val & "<br>")
ElseIf StrComp(Type,"Img",1) = 0 Then
' Try to create an image
ImgElem = MC.Locate(Val)
If ImgElem Then
ImgHref = MC.Href(ImgElem)
If ImgHref Then
Response.Write("<img src=" & ImgHref
& "><br>")
End If
End If
ElseIf StrComp(Type,"Href",1) = 0 Then
' Write an href
Response.Write("<a href=" & Val & ">" & Tag & "</a><br>")
End If
End If
Next
Next
End If
%>
<br> <br><hr>
<b>Note:</b> This page was automatically generated because the correct
scripts could not be found. If this problem persists after synchronization,
please contact the content provider.
</body>
</html>