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.
| 1. / 2. / ...
add to abcode.php:
Dropdown Menu (optional)
add into function cs_abcode_features...
$trackmania = "javascript:abc_insert('[' + this.form.tm";
$trackmania .= $name . ".options[this.form.tm" . $name . ".selectedIndex].value + ']";
$trackmania .= "','[/' + this.form.tm";
$trackmania .= $name . ".options[this.form.tm" . $name . ".selectedIndex].value + ']','" . $name . "');this.selectedIndex=0";
$var .= cs_html_select(1,'tm' . $name,"onchange=\"" . $trackmania . "\"");
$var .= cs_html_option('TMX','');
$var .= cs_html_option('Nations Forever','tmnf');
$var .= cs_html_option('United','tmu');
$var .= cs_html_option('Nations','tmn');
$var .= cs_html_select(0);
----------------------------------------------------------------------
add three new functions to abcode.php
function cs_abcode_tmnf($matches) {
$check = file_get_contents("http://tmnforever.tm-exchange.com/apiget.aspx?action=apisearch&trackid=".$matches[1]);
if ($check != "") {
$tmxinfo = explode("\t", $check);
$linkalias = $tmxinfo[1].' by '.$tmxinfo[3].' (Nations Forever '.$matches[1].')';
$blub = 'http://tmnforever.tm-exchange.com/main.aspx?action=trackshow&id='.$matches[1].'#auto';
return cs_html_link($blub,$linkalias);
}
else {
$fail = 'No track found with ID '.$matches[1].' @ tmnforever.tm-exchange.com';
return $fail;
}
}
function cs_abcode_tmu($matches) {
$check = file_get_contents("http://united.tm-exchange.com/apiget.aspx?action=apisearch&trackid=".$matches[1]);
if ($check != "") {
$tmxinfo = explode("\t", $check);
$linkalias = $tmxinfo[1].' by '.$tmxinfo[3].' (United '.$matches[1].')';
$blub = 'http://united.tm-exchange.com/main.aspx?action=trackshow&id='.$matches[1].'#auto';
return cs_html_link($blub,$linkalias);
}
else {
$fail = 'No track found with ID '.$matches[1].' @ united.tm-exchange.com';
return $fail;
}
}
function cs_abcode_tmn($matches) {
$check = file_get_contents("http://nations.tm-exchange.com/apiget.aspx?action=apisearch&trackid=".$matches[1]);
if ($check != "") {
$tmxinfo = explode("\t", $check);
$linkalias = $tmxinfo[1].' by '.$tmxinfo[3].' (Nations '.$matches[1].')';
$blub = 'http://nations.tm-exchange.com/main.aspx?action=trackshow&id='.$matches[1].'#auto';
return cs_html_link($blub,$linkalias);
}
else {
$fail = 'No track found with ID '.$matches[1].' @ nations.tm-exchange.com';
return $fail;
}
}
----------------------------------------------------------------------
add into function cs_secure after "if (!empty($phpeval))"
$replace = preg_replace_callback("=\[tmnf\](.*?)\[/tmnf\]=si","cs_abcode_tmnf",$replace);
$replace = preg_replace_callback("=\[tmu\](.*?)\[/tmu\]=si","cs_abcode_tmu",$replace);
$replace = preg_replace_callback("=\[tmn\](.*?)\[/tmn\]=si","cs_abcode_tmn",$replace); |