PDA

View Full Version : altering the vbcode lang


Sarge
08-15-2001, 05:39 PM
What I want to do is when people use the IMG dropdown for the code buttons it uses this
<img src="the pic" align="left">
instead of the [ img] the pic [ /img]

Basically I want to align the pictures to the left

IS this possible?
Sarge

function vbcode(theform,vbcode,prompttext) {
// insert yyy style markup
if ((normalmode(theform)) || (vbcode=="IMG")) {
inserttext = prompt(tag_prompt+"\n["+vbcode+"]xxx[/"+vbcode+"]",prompttext);
if ((inserttext != null) && (inserttext != ""))
theform.message.value += "["+vbcode+"]"+inserttext+"[/"+vbcode+"] ";
}
else {
donotinsert = false;
for (i = 0; i < tags.length; i++) {
if (tags[i] == vbcode)
donotinsert = true;
}
if (donotinsert)
stat("already_open");
else {
theform.message.value += "["+vbcode+"]";
arraypush(tags,vbcode);
}
}
theform.message.focus();
}

Sarge
08-15-2001, 05:42 PM
thanks in advance

Admin
08-15-2001, 06:09 PM
All you want to do is to align the images to the left?

In functions.php under your admin folder find
$bbcode = preg_replace("/(\[)(img)(])(\r\n)*([^\"".iif($allowdynimg,"","\?\&")."]*)(\[\/img\])/siU", "<img src=\"\\5\" border=\"0\" alt=\"\">", $bbcode);
and replace with
$bbcode = preg_replace("/(\[)(img)(])(\r\n)*([^\"".iif($allowdynimg,"","\?\&")."]*)(\[\/img\])/siU", "<img src=\"\\5\" border=\"0\" alt=\"\" align=\"left\">", $bbcode);
and that's it. :)

Sarge
08-15-2001, 08:18 PM
thanks broheim!