Source code of tbs_us_examples_prmmagnet.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>TinyButStrong - Example of magnet tags</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./tbs_us_examples_styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.cell-1 {
background-color:#8FC2ED;
}
</style>
<script type="text/javascript">
<!--
// fixed by Andrea (2012)
function f_Select(x) {
var url = window.location.href;
if (url.indexOf('?')==-1) {
sPrm = '?empty=';
} else {
sPrm = '&empty=';
}
if ( (url.indexOf('&empty=')==-1) && (url.indexOf('?empty=')==-1)) {
url = url + sPrm + x;
} else {
url = url.substring(0, url.length-1) + x;
}
window.location.href = url;
}
-->
</script>
</head>
<body>
<div id="main-body">
<h1>Example of magnet tags</h1>
<div class="w3cinfo"> this TBS template is W3C compliant <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" style="border:none;" /></a> </div>
<div id="example">
<p>A Magnet tag is an Html tag linked to a TBS field. The Magnet tag is deleted when the field is deleted, i.e. when the field is null or empty string. A Magnet tag is defined using parameter <samp>magnet</samp>. The type of the tag (single or opening-closing) and its position are defined using parameter <samp>mtype</samp>.</p>
<table border="0" cellpadding="2" cellspacing="2" style="width:100%">
<tr valign="top">
<td colspan="3"><form action="" method="post" id="frm_choice">
<fieldset>
<input name="r_empty" type="radio" value="0" onclick="f_Select(0)" />
<!--[onshow.empty;att=input#checked;magnet=#;atttrue=0;comm] -->
Non-empty values
<input name="r_empty" type="radio" value="1" onclick="f_Select(1)" />
<!--[onshow.empty;att=input#checked;magnet=#;atttrue=1;comm] -->
Empty values
</fieldset>
</form></td>
</tr>
<tr valign="top">
<th align="left" class="title-section2" style="width:160px;">Parameter</th>
<th align="left" class="title-section2">Value</th>
<th align="left" class="title-section2" style="width:110px;">Display</th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td class="text-example2">magnet=a</td>
<td>$url = '[onshow.url]'</td>
<td class="cell-1">Link: <a href="http://[onshow.url;magnet=a]">TBS Site</a></td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td class="text-example2">magnet=a;mtype=m+m</td>
<td> $url = '[onshow.url]'</td>
<td class="cell-1"> Link: <a href="http://[onshow.url;magnet=a;mtype=m+m]" >TBS Site</a></td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td class="text-example2">magnet=img;mtype=m*</td>
<td> $image = '[onshow.image]'</td>
<td style="height:20px;" class="cell-1"> Image: <img src="[onshow.image;magnet=img;mtype=m*]" width="14" height="14" alt="Smiley" /></td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td class="text-example2">magnet=br; mtype=*m</td>
<td> $line2 = '[onshow.line2]'</td>
<td class="cell-1"> Address:<br />
-------- <br />
[onshow.line1;magnet=br;mtype=*m]<br />
[onshow.line2;magnet=br;mtype=*m]<br />
--------</td>
</tr>
</table>
</div>
</div>
</body>
</html>