diff --git a/e107_core/bbcodes/b.bb b/e107_core/bbcodes/b.bb index 695f7b798..7852cde33 100644 --- a/e107_core/bbcodes/b.bb +++ b/e107_core/bbcodes/b.bb @@ -1 +1,4 @@ -return "$code_text"; \ No newline at end of file +//getClass('b'); +return "$code_text"; diff --git a/e107_core/bbcodes/bb_block.php b/e107_core/bbcodes/bb_block.php index 98ee01d8d..f1a57932d 100644 --- a/e107_core/bbcodes/bb_block.php +++ b/e107_core/bbcodes/bb_block.php @@ -50,8 +50,7 @@ class bb_block extends e_bb_base if($parm && !strpos($parm, '=')) $parm = 'class='.$parm; $parms = eHelper::scParams($parm); - $class = varsettrue($parms['class']) ? ' class="'.eHelper::secureClassAttr($parms['class']).'"' : ''; - if(!$class) $class = ' class="bbcode"'; + $class = " ".e107::getBB()->getClass('block'); $id = varsettrue($parms['id']) ? ' id='.eHelper::secureIdAttr($parms['id']) : ''; $style = varsettrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : ''; diff --git a/e107_core/bbcodes/bb_h.php b/e107_core/bbcodes/bb_h.php index 97b2f19ad..8919a6ba9 100644 --- a/e107_core/bbcodes/bb_h.php +++ b/e107_core/bbcodes/bb_h.php @@ -1,4 +1,4 @@ -getClass('h2'); // consistent classes across all themes. $id = varsettrue($parms['id']) ? ' id='.eHelper::secureIdAttr($parms['id']) : ''; $style = varsettrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : ''; diff --git a/e107_core/bbcodes/bb_p.php b/e107_core/bbcodes/bb_p.php index 2c91b3b00..cbaac8e08 100644 --- a/e107_core/bbcodes/bb_p.php +++ b/e107_core/bbcodes/bb_p.php @@ -60,8 +60,7 @@ class bb_p extends e_bb_base $parms = eHelper::scParams($parm); - $class = varsettrue($parms['class']) ? ' class="'.eHelper::secureClassAttr($parms['class']).'"' : ''; - if(!$class) $class = ' class="bbcode"'; + $class = " ".e107::getBB()->getClass('p'); // consistent classes across all themes. $id = varsettrue($parms['id']) ? ' id="'.eHelper::secureIdAttr($parms['id']).'"' : ''; $style = varsettrue($parms['style']) ? ' style="'.eHelper::secureStyleAttr($parms['style']).'"' : ''; diff --git a/e107_core/bbcodes/bb_youtube.php b/e107_core/bbcodes/bb_youtube.php index 8b1e95069..7985a439a 100644 --- a/e107_core/bbcodes/bb_youtube.php +++ b/e107_core/bbcodes/bb_youtube.php @@ -342,18 +342,20 @@ class bb_youtube extends e_bb_base $url .= "&autoplay=".intval($params['autoplay']); } + $class = "bbcode ".e107::getBB()->getClass('youtube'); // consistent classes across all themes. + $ret = ' - + '; // Not XHTML - but needed for compatibility. - $ret .= ''; + $ret .= ''; $ret .= ''; $ret .= ' diff --git a/e107_core/bbcodes/blockquote.bb b/e107_core/bbcodes/blockquote.bb index f5efd592d..ef8f40166 100644 --- a/e107_core/bbcodes/blockquote.bb +++ b/e107_core/bbcodes/blockquote.bb @@ -1 +1,3 @@ -return "
{$code_text}
"; \ No newline at end of file +//getClass('blockquote'); +return "
{$code_text}
"; \ No newline at end of file diff --git a/e107_core/bbcodes/center.bb b/e107_core/bbcodes/center.bb index 808a55025..3724b50bc 100644 --- a/e107_core/bbcodes/center.bb +++ b/e107_core/bbcodes/center.bb @@ -1 +1,5 @@ -return "
$code_text
"; \ No newline at end of file +//getClass('center'); + +return "
$code_text
"; \ No newline at end of file diff --git a/e107_core/bbcodes/code.bb b/e107_core/bbcodes/code.bb index 80b359d60..cb582810b 100644 --- a/e107_core/bbcodes/code.bb +++ b/e107_core/bbcodes/code.bb @@ -1,3 +1,6 @@ +//getClass('code'); + global $pref, $e107cache, $tp; if($pref['smiley_activate']) @@ -31,14 +34,14 @@ if(isset($pref['useGeshi']) && $pref['useGeshi'] && file_exists(e_PLUGIN."geshi/ $CodeCache = $geshi->parse_code(); $e107cache->set('GeshiParsed_'.$code_md5, $CodeCache); } - $ret = "
".str_replace("&", "&", $CodeCache)."
"; + $ret = "
".str_replace("&", "&", $CodeCache)."
"; } else { $code_text = html_entity_decode($code_text, ENT_QUOTES, 'utf-8'); $highlighted_text = highlight_string($code_text, TRUE); $divClass = ($parm) ? $parm : 'code_highlight'; - $ret = "
{$highlighted_text}
"; + $ret = "
{$highlighted_text}
"; } $ret = str_replace("[", "[", $ret); return $ret; \ No newline at end of file diff --git a/e107_core/bbcodes/color.bb b/e107_core/bbcodes/color.bb index 4b4044294..889e1653d 100644 --- a/e107_core/bbcodes/color.bb +++ b/e107_core/bbcodes/color.bb @@ -1,3 +1,6 @@ +//getClass('color'); + $aColors = array( "black" => "#000000", "blue" => "#0000FF", @@ -26,13 +29,13 @@ $aColors = array( if(array_key_exists($parm, $aColors)) { - return "$code_text"; + return "$code_text"; } else { if(preg_match("/(#[a-fA-F0-9]{3,6})/", $parm, $matches)) { - return "$code_text"; + return "$code_text"; } } \ No newline at end of file diff --git a/e107_core/bbcodes/email.bb b/e107_core/bbcodes/email.bb index bfbcefd19..6114b5b7e 100644 --- a/e107_core/bbcodes/email.bb +++ b/e107_core/bbcodes/email.bb @@ -1,3 +1,5 @@ +//getClass('email'); global $pref; @@ -21,7 +23,7 @@ if($pref['make_clickable']) } // Old method that attracts SPAM. if ($parm) { - return "".$code_text.""; + return "".$code_text.""; } else { - return "".$code_text.""; + return "".$code_text.""; } \ No newline at end of file diff --git a/e107_core/bbcodes/file.bb b/e107_core/bbcodes/file.bb index 90f136027..72b12d8e1 100644 --- a/e107_core/bbcodes/file.bb +++ b/e107_core/bbcodes/file.bb @@ -1,3 +1,6 @@ +//getClass('file'); + global $pref, $fromadmin; if ((e_PAGE == 'page.php') || (array_key_exists('forum_attach', $pref) && $pref['forum_attach'] && FILE_UPLOADS || ADMIN || $fromadmin)) @@ -35,5 +38,5 @@ if ((e_PAGE == 'page.php') || (array_key_exists('forum_attach', $pref) && $pref[ { $fname = str_replace('{e_BASE}', SITEURL, $fname); // Translate into an absolute URL } - return " ".$code_text.""; + return " ".$code_text.""; } diff --git a/e107_core/bbcodes/flash.bb b/e107_core/bbcodes/flash.bb index b0b97773b..fc66dfdee 100644 --- a/e107_core/bbcodes/flash.bb +++ b/e107_core/bbcodes/flash.bb @@ -1,3 +1,6 @@ +//getClass('flash'); + // USAGE: [flash=width,height,param_name=value¶m_name=value]http://www.example.com/file.swf[/flash] $movie_path = $tp->toAttribute($code_text); @@ -7,7 +10,7 @@ $width = preg_replace('#[^0-9%]#', '', varsettrue($parm_array[0], 50)); $height= preg_replace('#[^0-9%]#', '', varsettrue($parm_array[1], 50)); $text = " - + diff --git a/e107_core/bbcodes/i.bb b/e107_core/bbcodes/i.bb index 416b9b982..ae6959c2c 100644 --- a/e107_core/bbcodes/i.bb +++ b/e107_core/bbcodes/i.bb @@ -1 +1,4 @@ -return "$code_text"; \ No newline at end of file +//getClass('i'); + +return "$code_text"; \ No newline at end of file diff --git a/e107_core/bbcodes/img.bb b/e107_core/bbcodes/img.bb index 0f8add595..c173f2960 100644 --- a/e107_core/bbcodes/img.bb +++ b/e107_core/bbcodes/img.bb @@ -1,3 +1,5 @@ +//getClass('img'); // $Id$ // General purpose image bbcode. As well as the obvious insertion of a picture: @@ -21,7 +23,7 @@ $replace = array(''', e_IMAGE_ABS, e_FILE_ABS, e_IMAGE_ABS, e_FILE_ABS); $replaceInt = array(''', e_IMAGE, e_FILE, e_IMAGE, e_FILE); $intName = str_replace($search, $replaceInt, $code_text); // Server-relative file names unset($imgParms); -$imgParms['class']="bbcode floatnone"; // This will be overridden if a new class is specified +$imgParms['class']="bbcode {$class}"; // This will be overridden if a new class is specified $imgParms['alt']=''; diff --git a/e107_core/bbcodes/justify.bb b/e107_core/bbcodes/justify.bb index 7826db99e..a3e012628 100644 --- a/e107_core/bbcodes/justify.bb +++ b/e107_core/bbcodes/justify.bb @@ -1 +1,4 @@ -return "
$code_text
"; \ No newline at end of file +//getClass('justify'); + +return "
$code_text
"; \ No newline at end of file diff --git a/e107_core/bbcodes/left.bb b/e107_core/bbcodes/left.bb index ba6292321..d57a68af1 100644 --- a/e107_core/bbcodes/left.bb +++ b/e107_core/bbcodes/left.bb @@ -1 +1,3 @@ -return "
$code_text
"; +//getClass('left'); +return "
$code_text
"; diff --git a/e107_core/bbcodes/link.bb b/e107_core/bbcodes/link.bb index c1f4b8861..0e3c5ec6f 100644 --- a/e107_core/bbcodes/link.bb +++ b/e107_core/bbcodes/link.bb @@ -1,5 +1,8 @@ // $Id$ //getClass('link'); global $pref; /** @@ -67,5 +70,5 @@ global $pref; $insert = ($pref['links_new_window'] && strpos($link,"{e_")===FALSE && substr($link,0,1) != "#" && substr($link,0,1) != "/" && strpos($extras,"rel=internal")===FALSE) ? "rel='external' " : ""; } if (strtolower(substr($link,0,11)) == 'javascript:') return ''; - return "".$code_text.""; + return "".$code_text.""; diff --git a/e107_core/bbcodes/list.bb b/e107_core/bbcodes/list.bb index 28815fbc0..4570e5d8b 100644 --- a/e107_core/bbcodes/list.bb +++ b/e107_core/bbcodes/list.bb @@ -14,6 +14,8 @@ upper-alpha A, B, C */ +$class = e107::getBB()->getClass('list'); + if (strpos($code_text,"[*]") !== FALSE) { $listitems = explode("[*]", $code_text); @@ -38,7 +40,7 @@ foreach($listitems as $item) { if($item && $item != E_NL) { - $listtext .= "
  • $item
  • "; + $listtext .= "
  • $item
  • "; } } return $listtext.$trailer; diff --git a/e107_core/bbcodes/quote.bb b/e107_core/bbcodes/quote.bb index 4ba452688..fa549245e 100644 --- a/e107_core/bbcodes/quote.bb +++ b/e107_core/bbcodes/quote.bb @@ -1,2 +1,5 @@ +//getClass('quote'); include_lan(e_LANGUAGEDIR.e_LANGUAGE."/lan_parser_functions.php"); -return "
    $parm ".LAN_WROTE." ...
    $code_text
    "; + +return "
    $parm ".LAN_WROTE." ...
    $code_text
    "; diff --git a/e107_core/bbcodes/right.bb b/e107_core/bbcodes/right.bb index 4a69d82e3..b89b4adeb 100644 --- a/e107_core/bbcodes/right.bb +++ b/e107_core/bbcodes/right.bb @@ -1 +1,4 @@ -return "
    $code_text
    "; +//getClass('right'); + +return "
    $code_text
    "; diff --git a/e107_core/bbcodes/size.bb b/e107_core/bbcodes/size.bb index 99a90bab6..33f02cbdf 100644 --- a/e107_core/bbcodes/size.bb +++ b/e107_core/bbcodes/size.bb @@ -1,6 +1,9 @@ +//getClass('size'); + if(is_numeric($parm) && $parm > 0 && $parm < 38) { - return "$code_text"; + return "$code_text"; } else { diff --git a/e107_core/bbcodes/spoiler.bb b/e107_core/bbcodes/spoiler.bb index bc1991a52..0653371a2 100755 --- a/e107_core/bbcodes/spoiler.bb +++ b/e107_core/bbcodes/spoiler.bb @@ -1,2 +1,5 @@ +//getClass('spoiler'); + $spoiler_color = (defined("SPOILER_COLOR") ? SPOILER_COLOR : "#ff00ff"); -return "$code_text"; +return "$code_text"; diff --git a/e107_core/bbcodes/stream.bb b/e107_core/bbcodes/stream.bb index 940a5bcb7..3dd697858 100755 --- a/e107_core/bbcodes/stream.bb +++ b/e107_core/bbcodes/stream.bb @@ -1,3 +1,5 @@ +//getClass('stream'); unset($stream_parms); if($parm) @@ -37,7 +39,7 @@ foreach($stream_parms as $k => $v) } $ret = " -\n"; +\n"; $ret .= "\n"; $ret .= $MozparmStr; $ret .= " diff --git a/e107_core/bbcodes/table.bb b/e107_core/bbcodes/table.bb new file mode 100644 index 000000000..efe0f5f58 --- /dev/null +++ b/e107_core/bbcodes/table.bb @@ -0,0 +1,4 @@ +//getClass('table'); +return "".$code_text."
    "; diff --git a/e107_core/bbcodes/tbody.bb b/e107_core/bbcodes/tbody.bb new file mode 100644 index 000000000..c027d4571 --- /dev/null +++ b/e107_core/bbcodes/tbody.bb @@ -0,0 +1,4 @@ +//getClass('tbody'); +return "".$code_text."\n"; diff --git a/e107_core/bbcodes/td.bb b/e107_core/bbcodes/td.bb new file mode 100644 index 000000000..38a0cd8da --- /dev/null +++ b/e107_core/bbcodes/td.bb @@ -0,0 +1,4 @@ +//getClass('td'); +return "".$code_text.""; diff --git a/e107_core/bbcodes/textarea.bb b/e107_core/bbcodes/textarea.bb index ca60fb847..ab9724bfd 100644 --- a/e107_core/bbcodes/textarea.bb +++ b/e107_core/bbcodes/textarea.bb @@ -1,5 +1,8 @@ +//getClass('textarea'); $tastr = ""; parse_str($parm, $tmp); @@ -7,4 +10,4 @@ foreach($tmp as $key => $p) { $tastr .= $tp -> toAttribute($key)." = '".$tp -> toAttribute($p)."' "; } -return ""; +return ""; diff --git a/e107_core/bbcodes/time.bb b/e107_core/bbcodes/time.bb index 3f0b78533..2aecd23ff 100644 --- a/e107_core/bbcodes/time.bb +++ b/e107_core/bbcodes/time.bb @@ -1,2 +1,6 @@ +//getClass('time'); + include_once(e_HANDLER."date_handler.php"); -return convert::convert_date($code_text, $parm); +return "".convert::convert_date($code_text, $parm).""; diff --git a/e107_core/bbcodes/tr.bb b/e107_core/bbcodes/tr.bb new file mode 100644 index 000000000..94397b6d6 --- /dev/null +++ b/e107_core/bbcodes/tr.bb @@ -0,0 +1,3 @@ +//getClass('tr'); +return "".$code_text.""; diff --git a/e107_core/bbcodes/u.bb b/e107_core/bbcodes/u.bb index 76554b93f..e3264fd45 100644 --- a/e107_core/bbcodes/u.bb +++ b/e107_core/bbcodes/u.bb @@ -1 +1,3 @@ -return "$code_text"; \ No newline at end of file +//getClass('u'); +return "$code_text"; \ No newline at end of file diff --git a/e107_core/bbcodes/url.bb b/e107_core/bbcodes/url.bb index 56e01965e..06320796b 100644 --- a/e107_core/bbcodes/url.bb +++ b/e107_core/bbcodes/url.bb @@ -1,3 +1,5 @@ +//getClass('url'); global $pref; $parm = trim($parm); @@ -8,12 +10,12 @@ if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE) $parm = preg_replace('#^external.#is', '', $parm); if (strtolower(substr($parm, 0, 11)) == 'javascript:') return ''; - return ''.$code_text.''; + return ''.$code_text.''; } else { if (strtolower(substr($code_text, 0, 11)) == 'javascript:') return ''; - return ''.$code_text.''; + return ''.$code_text.''; }