V5.51: Multimedia WAP Push Templates

V5.51: Multimedia WAP Push Templates SearchSearch
Author Message
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3318
Registered: 10-2002
Posted on Friday, August 20, 2004 - 03:45 pm:   

v5.51 will look for a multimedia WAP push template file named MMWAP-TEMPLATE.WML, which needs to be stored in the MMSCDATA subdirectory. (If this file is not present, or is invalid, NowSMS will continue to use the inbuilt multimedia WAP Push formatting of previous releases.)

The following is a sample template that produced output similar to the default inbuilt MMWAPPush template:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="@@SUBJECT@@">
<p>
<b>From:</b> @@FROM@@
<br/>
<b>Subject:</b> @@SUBJECT@@
<br/>
<br/>
@@BEGINTEXT@@
@@TEXT@@
<br/>
@@ENDTEXT@@
@@BEGINCONTENT@@
@@CONTENTPREVIEW@@
<br/>
@@CONTENTLINK@@
<br/>
@@ENDCONTENT@@
</p>
</card>
</wml>

Basically, the replaceable parameters that are supported are as follows:

@@FROM@@ - From/sender information
@@SUBJECT@@ - Subject text

(Both of the above are optional, and do not need to be included.)

There are then text blocks and content blocks. Text blocks will be used for any text submitted with the "MMSTEXT" variable, and for the content of any text files.

Content blocks contain images and other content.

A text block is delimited by @@BEGINTEXT@@ and @@ENDTEXT@@ markers. For each text block, the content between these markers will be inserted into the message. Within this block, a replaceable parameter of @@TEXT@@ is a placeholder for the text.

A content block is delimited by @@BEGINCONTENT@@ and @@ENDCONTENT@@ markers. For each content block, the content between these markers will be inserted into the message. Within this block, the following replaceable parameters are supported:

@@CONTENTPREVIEW@@ - For images only, this parameter will be replaced by an "img" link that points to a scaled down preview of the image. (For other content types, this will be blank.)

@@CONTENTLINK@@ - This builds a preformatted anchor link for downloading the content, using the following format:

<a href="link">Download image/audio/video/file Filename.Ext</a>

"image", "audio", "video", or "file" is automatically inserted based upon the content type. (See http://support.nowsms.com/discus/messages/1/670.html for the ability to translate these strings.)

You do not have to use the @@CONTENTLINK@@ parameter, and instead can build your own anchors.

@@CONTENTURL@@ - The URL for the content will be inserted into this parameter if you wish to build your own anchor.

@@CONTENTFILENAME@@ - The original filename for the content will be inserted into this parameter.


When submitting a multimedia WAP Push message, it is also possible to specify a variable in the submission, MMWAPTemplate=filename, which specifies the name of a template to be used.

If this parameter is not specified, NowSMS will look for "MMWAP-TEMPLATE.WML". (And if MMWAP-TEMPLATE.WML does not exist, it will use the inbuilt template.)

All template files must be stored in the MMSCDATA subdirectory of the NowSMS installation.

More information about the evolution of this feature, and additional usage notes can be found in the following thread: http://support.nowsms.com/discus/messages/485/3315.html

More information on NowSMS v5.51 can be found at the following links:

Release highlights: http://www.nowsms.com/newsletter/20040823.htm
Detail of changes: http://support.nowsms.com/discus/messages/53/5898.html
Download (available 23-Aug-2004): http://www.nowsms.com/downloads/smsmmsgateway.htm
Anonymous
 
Posted on Saturday, October 23, 2004 - 01:07 pm: