Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 21st July 2009, 18:04
Shurubel Shurubel is offline
Member
 
Join Date: Jul 2009
Romania
Posts: 4
Default Error, Forum
Hi i have a problem, i want to create a topic but apper a problem
Body
Code:
Fatal error:  Call to undefined function  textbbcode() in C:\xampp\htdocs\forums.php on line 333


at the line 333 on forums.php appear

Attached Files
File Type: txt error.txt (146 Bytes, 7 views)
File Type: php forums.php (71.1 KB, 7 views)
Reply With Quote
  #2  
Old 21st July 2009, 20:58
3v0 3v0 is offline
Senior Member
 
Join Date: Feb 2008
Netherlands
Posts: 88
Default
You need to add the textbbcode function.

new textbbcode function

textbbcode function
Reply With Quote
  #3  
Old 22nd July 2009, 07:49
Shurubel Shurubel is offline
Member
 
Join Date: Jul 2009
Romania
Posts: 4
Default
don't work :sorry:

step by step please
Reply With Quote
  #4  
Old 22nd July 2009, 11:01
sammygo sammygo is offline
Senior Member
 
Join Date: May 2008
P2P
Posts: 141
Default
---------------------------------------------
New textbbcode function
---------------------------------------------
add this inside format_comment function
Code:
//[align=(center|left|right|justify)]text[/align]
$s = preg_replace("/\[align=([a-zA-Z]+)\]((\s|.)+?)\[\/align\]/i","<div style=\"text-align:\\1\">\\2</div>", $s); 
//[s]strike[/s]
$s = preg_replace("/\[s\]((\s|.)+?)\[\/s\]/i", "<s>\\1</s>", $s);
//[mail]mail[/mail]
$s = preg_replace("/\[mail\]((\s|.)+?)\[\/mail\]/i","<a href=\"mailto:\\1\" targe=\"_blank\">\\1</a>", $s);
The arhive is for this mod ^ scroll down and download it !
---------------------------------------------
Textbbcode function
---------------------------------------------
Don't forget to remove the space from java script ie.
Code:
 javascript
Replace your function with this in global.php
Code:
// Credits: original creator; improvements by t.bz team
function textbbcode($form,$name,$content="") {
?>

<script language=javascript>
function insertAtCursor(myField, myValue) {
//IE support
  if (document.selection) {
    myField.focus();
    sel = document.selection.createRange();
    sel.text = myValue;
  }

//MOZILLA/NETSCAPE support
  else if (myField.selectionStart || myField.selectionStart == '0') {
    var startPos = myField.selectionStart;
    var endPos = myField.selectionEnd;
    myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
    myField.selectionEnd = startPos + myValue.length;
  } else {
    myField.value += myValue;
  }
  myField.focus();
}

// calling the function
function SmileIT(smile,form,text){
    insertAtCursor(document.forms[form].elements[text], smile)
}

function PopMoreSmiles(form,name) {
         link='moresmiles.php?form='+form+'&text='+name
         newWin=window.open(link,'moresmile','height=500,width=450,resizable=no,scrollbars=yes');
         if (window.focus) {newWin.focus()}
}

function PopMoreTags(form,name) {
         link='moretags.php?form='+form+'&text='+name
         newWin=window.open(link,'moresmile','height=500,width=775,resizable=no,scrollbars=yes');
         if (window.focus) {newWin.focus()}
}


function BBTag(tag,s,text,form){
  var df  = document.forms[form].elements[s];
  var ele = document.forms[form].elements[text];
  var tval;
  var ttag;
  switch(tag) {
    case '<<<@!1!@>>>";
            if(df.value == "QUOTE ") {
              tval = "QUOTE*";
              ttag  = "[quote]";
            }
            break;
    case '[img]':
            tval = "IMG ";
            ttag = "[/img]";
            if(df.value == "IMG ") {
              tval = "IMG*";
              ttag  = "[img]";
            }
            break;

    case '':
tval = "URL ";
ttag = "";
            if(df.value == "URL ") {
              tval = "URL*";
              ttag  = "[url]";
            }
            break;

    case '[*]':
            tval= "List ";
                        if(df.value == "List ") ttag  = "[*]";
            break;

            insertAtCursor(ele, tag);
            df.elements[s].value = tval;
            break;

    case '[hr]':
                        tval= "Hr ";
                        if(df.value =="HR "){
                            ttag="[HR]";
            }
                        insertAtCursor(ele,tag);
            df.elements[s].value=tval;
            break;

    case '
': tval= "Center"; ttag= "
"; if(df.value == "Center "){ tval = "Center* "; ttag="[center]"; } break; case '': tval = "B "; ttag = ""; if(df.value == "B ") { tval = "B*"; ttag = "[b]"; } break; case '': tval = "I "; ttag = ""; if(df.value == "I ") { tval = "I*"; ttag = "[i]"; } break; case '': tval = "U "; ttag = ""; if(df.value == "U ") { tval = "U*"; ttag = "[u]"; } break; } if(tval!="") df.value = tval; if(ttag!="") insertAtCursor(ele, ttag); } </script> <table width="100%" style='margin: 3px' cellpadding="0" cellspacing="0"> <tr> <td class=embedded colspan=2> <table cellpadding="2" cellspacing="1"> <tr> <td class=embedded><input style="font-weight: bold;" type="button" name="bold" value="B " onclick="java script: BBTag('[b]','bold','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input style="font-style: italic;" type="button" name="italic" value="I " onclick="java script: BBTag('[i]','italic','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input style="text-decoration: underline;" type="button" name="underline" value="U " onclick="java script: BBTag('[u]','underline','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input type="button" name="li" value="List " onclick="java script: BBTag('[*]','li','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input type="button" name="quote" value="QUOTE " onclick="java script: BBTag('[quote]','quote','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input type="button" name="url" value="URL " onclick="java script: BBTag('[url]','url','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input type="button" name="img" value="IMG " onclick="java script: BBTag('[img]','img','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input type="button" name="hr" value="HR " onclick="java script: BBTag('[hr]','hr','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded><input type="button" name="center" value="Center " onclick="java script: BBTag('[center]','center','<? echo $name; ?>','<? echo $form; ?>')" /></td> <td class=embedded>&nbsp;<a href="java script: PopMoreTags('<? echo $form; ?>','<? echo $name; ?>')"><? echo MORE_TAGS;?></a></td> </tr> </table> </td> </tr> <tr> <td class=embedded> <textarea name="<?=$name?>" rows="15" cols="80"><?=$content?></textarea> </td> <td class=embedded> <table cellpadding="3" cellspacing="1"> <? global $smilies, $BASEURL; while ((list($code, $url) = each($smilies)) && $count<20) { if ($count % 4==0) print("<tr>"); print("\n<td class=embedded style='padding: 3px; margin: 2px'><a href=\"java script: SmileIT('".str_replace("'","\'",$code)."','$form','$name')\"><img border=0 src=".$GLOBALS['pic_base_url']."/smilies/".$url."></a></td>"); $count++; if ($count % 4==0) print("</tr>"); } ?> </table> <center><a href="java script: PopMoreSmiles('<? echo $form; ?>','<? echo $name; ?>')"><? echo MORE_SMILES;?></a></center> </td> </tr> </table> <? }
Attached Files
File Type: rar bbcode.rar (12.7 KB, 12 views)
Reply With Quote
Reply

Tags
error , forum

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forum installing error mat22 BT.Manager (phpMyBitTorrent) 1 10th February 2010 01:49
Forum error simalingur SZ Edition 12 9th February 2010 18:36
Forum piraders Yuna Scatari Edition (YSE) 3 28th December 2009 01:06
Forum? adso Torrent Trader 0 7th August 2009 23:36
Error Under Forum Azurious BT.Manager (phpMyBitTorrent) 6 18th January 2009 17:23



All times are GMT +2. The time now is 10:41. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.