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>&nbsp;<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 as best you 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>&nbsp;<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>