lol Guest_teamfsx_* it's me wt... lol ,np :)
Update 2015
new bbcode
In fonction.php delete all my video code if you want above page 1 and replace by this (code [allo] is for auto generateur post like prez)
In bbcode.php add this for center work :
and if you want you can create the button
Update 2015
new bbcode
In fonction.php delete all my video code if you want above page 1 and replace by this (code [allo] is for auto generateur post like prez)
//Text
while (preg_match("/s*((s|.)+?)s*s*/i", $s))
$s = preg_replace(
"/s*((s|.)+?)s*s*/i",
"<div style='text-align: center;'>1</div>", $s);
//[iframe]All videos links[/iframe]
$s = preg_replace("/[iframe]((www.|http://|https://)[^s]+?)s*[/iframe]/i",
"<iframe width='300' height='150' src='1' frameborder='0' allowfullscreen></iframe>", $s);
//[mp4]All videos links.mp4[/mp4]
$s = preg_replace("/[mp4]((www.|http://|https://)[^s]+?)s*[/mp4]/i",
"<video controls='controls' width='640' height='385' source='1' poster=''><source src='1' type='video/mp4' /></video>", $s);
//[allo]All videos links allociné[/allo]
$s = preg_replace("/[allo]((www.|http://|https://)[^s]+?)s*[/allo]/i",
"<object width='420' height='280'><param name='movie' value='1'></param><param name='allowFullScreen' value='true'></param><param name='allowScriptAccess' value='always'></param><embed src='1' type='application/x-shockwave-flash' width='420' height='280' allowFullScreen='true' allowScriptAccess='always'></embed></object>", $s);
In bbcode.php add this for center work :
break;
case '':
var start = document.forms[form].elements[text].selectionStart;
var end = document.forms[form].elements[text].selectionEnd;
if (start != end) {
var body = document.forms[form].elements[text].value;
var left = body.substr(body, start);
var middle = "[align=center]" + body.substring(start, end) + "";
var right = body.substr(end, body.length);
document.forms[form].elements[text].value = left + middle + right;
} else {
document.forms[form].elements[text].value = document.forms[form].elements[text].value + "";
}
and if you want you can create the button
<td align="center"><input type="button" name="center" value="CENTER " onclick="javascript: BBTag('[align=center]','center','<?php echo $name; ?>','<?php echo $form; ?>')" /></td>
