Las ediciones a hacer son estas:
Abrir /includes/bbcode.php
Buscar:
Código: Seleccionar todo
case 12:
$this->bbcode_cache[$bbcode_id] = array(
'str' => array(
'[/attachment:$uid]' => $this->bbcode_tpl('inline_attachment_close', $bbcode_id)
),
'preg' => array(
'#\[attachment=([0-9]+):$uid\]#' => $this->bbcode_tpl('inline_attachment_open', $bbcode_id)
)
);
break;
Código: Seleccionar todo
case 1000:
$this->bbcode_cache[$bbcode_id] = array(
'preg' => array(
'#\[jdmp(?:=([a-z]+))?:$uid\](.*?)\[/jdmp:$uid\]#ise' => "\$this->bbcode_second_pass_jd2('\$1', '\$2')",
)
);
break;
Buscar:
Código: Seleccionar todo
$code = $this->bbcode_tpl('code_open') . $code . $this->bbcode_tpl('code_close');
return $code;
}
Código: Seleccionar todo
function bbcode_second_pass_jd2($type, $jd2)
{
$jd2 = str_replace('\"', '"', $jd2);
switch ($type)
{
case 'php':
if (strpos($jd2, '<span class="syntaxdefault"><br /></span>') === 0)
{
$jd2 = substr($jd2, 41);
}
default:
$jd2 = str_replace("\t", ' ', $jd2);
$jd2 = str_replace(' ', ' ', $jd2);
$jd2 = str_replace(' ', ' ', $jd2);
$jd2 = str_replace("\n ", "\n ", $jd2);
if (!empty($jd2) && $jd2[0] == ' ')
{
$jd2 = ' ' . substr($jd2, 1);
}
if (!empty($jd2) && $jd2[0] == "\n")
{
$jd2 = substr($jd2, 1);
}
break;
}
$crypted = $jd2;
$key="1234567890987654";
$transmitKey = base_convert($key, 16, 2);
$cp = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', '');
@mcrypt_generic_init($cp, $key,$key);
$enc = mcrypt_generic($cp, $crypted);
$crypted2=base64_encode($enc);
$jdmp = $this->bbcode_tpl('jd_open') . $crypted2 . $this->bbcode_tpl('jd_close');
return $jdmp;
}
Abrir /includes/message_parser.php
Buscar:
Código: Seleccionar todo
'code' => array('bbcode_id' => 8, 'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#uise' => "\$this->bbcode_code('\$1', '\$2')")),
Código: Seleccionar todo
'jdmp' => array('bbcode_id' => 1000, 'regexp' => array('#\[jdmp(?:=([a-z]+))?\](.+\[/jdmp\])#uise' => "\$this->bbcode_jd('\$1', '\$2')")),
Buscar:
Código: Seleccionar todo
// if now $code_block has contents we need to parse the remaining code while removing the last closing tag to match up.
if ($code_block)
{
$code_block = substr($code_block, 0, -7);
$code_block = preg_replace($htm_match, $htm_replace, $code_block);
$out .= $this->bbcode_parse_code($stx, $code_block);
}
return $out;
}
Código: Seleccionar todo
function bbcode_parse_jd($stx, &$jd)
{
switch (strtolower($stx))
{
case 'php':
$remove_tags = false;
$str_from = array('<', '>', '[', ']', '.', ':', ':');
$str_to = array('<', '>', '[', ']', '.', ':', ':');
$jd = str_replace($str_from, $str_to, $jd);
if (!preg_match('/\<\?.*?\?\>/is', $jd))
{
$remove_tags = true;
$jd = "<?php $jd ?>";
}
$conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string');
foreach ($conf as $ini_var)
{
@ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var));
}
$jd = htmlspecialchars_decode($jd);
$jd = highlight_string($jd, true);
$str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
$str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '[', ']', '.', ':');
if ($remove_tags)
{
$str_from[] = '<span class="syntaxdefault"><?php </span>';
$str_to[] = '';
$str_from[] = '<span class="syntaxdefault"><?php ';
$str_to[] = '<span class="syntaxdefault">';
}
$jd = str_replace($str_from, $str_to, $jd);
$jd = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#is', '$1$2$3', $jd);
if ($remove_tags)
{
$jd = preg_replace('#(<span class="[a-z]+">)?\?>(</span>)#', '$1 $2', $jd);
}
$jd = preg_replace('#^<span class="[a-z]+"><span class="([a-z]+)">(.*)</span></span>#s', '<span class="$1">$2</span>', $jd);
$jd = preg_replace('#(?:\s++| )*+</span>$#u', '</span>', $jd);
if (!empty($jd) && substr($jd, -1) == "\n")
{
$jd = substr($jd, 0, -1);
}
return "[jdmp=$stx:" . $this->bbcode_uid . ']' . $jd . '[/jdmp:' . $this->bbcode_uid . ']';
break;
default:
return '[jdmp:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($jd) . '[/jdmp:' . $this->bbcode_uid . ']';
break;
}
}
function bbcode_jd($stx, $in)
{
if (!$this->check_bbcode('jdmp', $in))
{
return $in;
}
$htm_match = get_preg_expression('bbcode_htm');
unset($htm_match[4], $htm_match[5]);
$htm_replace = array('\1', '\1', '\2', '\1');
$out = $jd_block = '';
$open = 1;
while ($in)
{
preg_match('#(.*?)(\[jdmp(?:=([a-z]+))?\])(.+)#is', $in, $buffer);
$pos = (isset($buffer[1])) ? strlen($buffer[1]) : false;
$tag_length = (isset($buffer[2])) ? strlen($buffer[2]) : false;
$pos2 = stripos($in, '[/jdmp]');
if ($pos !== false && $pos < $pos2)
{
// Open new block
if (!$open)
{
$out .= substr($in, 0, $pos);
$in = substr($in, $pos);
$stx = (isset($buffer[3])) ? $buffer[3] : '';
$jd_block = '';
}
else
{
$jd_block .= substr($in, 0, $pos) . ((isset($buffer[2])) ? $buffer[2] : '');
$in = substr($in, $pos);
}
$in = substr($in, $tag_length);
$open++;
}
else
{
if ($open == 1)
{
$jd_block .= substr($in, 0, $pos2);
$jd_block = preg_replace($htm_match, $htm_replace, $jd_block);
$out .= $this->bbcode_parse_jd($stx, $jd_block);
$jd_block = '';
$open--;
}
else if ($open)
{
$jd_block .= substr($in, 0, $pos2 + 7);
$open--;
}
else
{
$out .= substr($in, 0, $pos2 + 7);
}
$in = substr($in, $pos2 + 7);
}
}
if ($jd_block)
{
$jd_block = substr($jd_block, 0, -7);
$jd_block = preg_replace($htm_match, $htm_replace, $jd_block);
$out .= $this->bbcode_parse_jd($stx, $jd_block);
}
return $out;
}
Abrir: /styles/tu_estilo/template/bbcode.html
Buscar:
Código: Seleccionar todo
<!-- BEGIN code_close --></code></dd></dl><!-- END code_close -->
Código: Seleccionar todo
<!-- BEGIN jd_open --><o><FORM title="Añadir enlaces a JDownloader y MiPony" style="position: relative;" target="ventana" ACTION="http://127.0.0.1:9666/flash/addcrypted2" target="hidden" METHOD="POST"><INPUT TYPE="hidden" NAME="passwords" VALUE="myPassword"> <INPUT TYPE="hidden" NAME="source" VALUE="http://jdownloader.org/spielwiese"> <INPUT TYPE="hidden" NAME="jk" VALUE="function f(){ return '31323334353637383930393837363534';}"><INPUT TYPE="hidden" NAME="crypted" VALUE="<!-- END jd_open -->
<!-- BEGIN jd_close -->"><INPUT TYPE="SUBMIT" onclick="$(this).val('Listo! Los links se agregaran en breve...'); $(this).addClass('ui-button-positive');" NAME="submit" VALUE="Añadir enlaces a JDownloader y MiPony"></FORM><iframe style="display: none;" name=ventana></iframe></o><!-- END jd_close -->
Abrir: /styles/tu_estilo/template/posting_buttons.html
Buscar:
Código: Seleccionar todo
<input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" />
Código: Seleccionar todo
<input type="button" class="button2" name="addbbcode22" value="jdmp" onclick="bbfontstyle('[jdmp]','[/jdmp]')" title="Agrega un boton que oculta los enlaces y los añade a JDownloader y MiPony usando click'N'load: [jdmp]Url's[/jdmp]">
Abrir: /styles/tu_estilo/template/posting_layout.html
Buscar y borrar:
Código: Seleccionar todo
<form id="postform" method="post" action="{S_POST_ACTION}"{S_FORM_ENCTYPE}>
Código: Seleccionar todo
<!-- IF S_DISPLAY_PREVIEW --><!-- INCLUDE posting_preview.html --><!-- ENDIF -->
Código: Seleccionar todo
<form id="postform" method="post" action="{S_POST_ACTION}"{S_FORM_ENCTYPE}>
Abrir: posting.php
Buscar:
Código: Seleccionar todo
$message_parser->message = &$post_data['post_text'];
Código: Seleccionar todo
$uid = $post_data['bbcode_uid'];
if ($mode == 'edit')
{
$message_parser->message = $message_parser->message;
}
else
{
$message_parser->message = preg_replace("#\[jdmp:$uid\].*?\[/jdmp:$uid\]#ise", "\$user->lang['HIDDEN_LINKS']", $message_parser->message);
}
Abrir: /language/es/common.php
Buscar:
Código: Seleccionar todo
'HIDDEN_USER_TOTAL_AND' => '%d oculto y ',
Código: Seleccionar todo
'HIDDEN_LINKS' => 'Enlaces ocultos',
