来自17cp.com的joey的修正。
class_bbcode.php
搜索
PHP 代码:
function is_wysiwyg()
{
return false;
}
后面添加
PHP 代码:
function handle_emule_links($text)
{
if(!$this->is_wysiwyg())
{
$text=str_replace("<br>","\n",$text);
$text=str_replace("<br />","\n",$text);
$text=preg_replace ("/(<\/?)(\w+)([^>]*>)/e","", $text);
$list=explode("\n",$text);
$rand=rand(0, 3);
foreach ( $list as $key => $emule )
{
if ( !empty($emule) OR $emule==" ")
{
$emule_array=explode("|",$emule);
$total+=$emule_array[3];
$totalper=$emule_array[3];
if($totalper>(1024*1024*1024*1024)){
$totalper=round($totalper/1024/1024/1024/1024,2);
if(!$totalper){continue; }
$totalper.="TB";
}elseif($totalper>(1024*1024*1024)){
$totalper=round($totalper/1024/1024/1024,2);
if(!$totalper){continue; }
$totalper.="GB";
}elseif($totalper>(1024*1024)){
$totalper=round($totalper/1024/1024,2);
if(!$totalper){continue; }
$totalper.="MB";
}else{
$totalper=round($totalper/1024,2);
if(!$totalper){continue; }
$totalper.="KB";
}
++$i;
$key1=iif($i%2, 1, 2);
$emule_array[2]=rawurldecode($emule_array[2]);
eval('$emulebit .= "' . fetch_template('emulebit') . '";');
}
}
if($total>(1024*1024*1024*1024)){
$total=round($total/1024/1024/1024/1024,2);
$total.="TB";
}elseif($total>(1024*1024*1024)){
$total=round($total/1024/1024/1024,2);
$total.="GB";
}elseif($total>(1024*1024)){
$total=round($total/1024/1024,2);
$total.="MB";
}else{
$total=round($total/1024,2);
$total.="KB";
}
$key2=iif($key%2, 1, 2);
eval('$text = "' . fetch_template('emule') . '";');
}
else
{
$text ="[emule]".$text."[/emule]" ;
}
return $text;
}
导入附件产品
修改摸班editor_toolbar_on
搜索
HTML 代码:
<if condition="$show['php_bbcode']">
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_php"><img src="$stylevar[imgdir_editor]/php.gif" width="21" height="20" alt="$vbphrase[wrap_php_tags]" /></div></td>
</if>
后面添加
HTML 代码:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_emule"><img src="$stylevar[imgdir_editor]/emule.gif" width="21" height="20" alt="添加emule标签" /></div></td>
修正了一些问题~ 部分内容写不进hook