hey guys...can you help me.... I've added this plugin to my forums : http://malwaretips.com/ ...but the text for the spoiler button it's in spanish ( eg:Mostarar contiendo) ..and I can't seem to change it in english without getting an error in ACP..can you modifiy it to english and post a attachment...or tell me what I need to channge Big Grin
yes, u can change it by editing the php file code,

Código PHP:
<?php

// Comprobamos si la constante IN_MYBB existe. Si no existe, paramos la ejecución del archivo mostrando un mensaje.

if(!defined("IN_MYBB"))
{
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}


// Enlazamos la función al hook. Esta función acepta varios parámetros, pero solo estos dos son requeridos:
// 1) El nombre del hook.
// 2) El nombre de la función.

$plugins->add_hook("parse_message""myspoiler_run");


function 
myspoiler_info()
{
    
// Creamos el enlace hacia la hoja de estilo.
    
    
global $mybb$db;
    
$editar_estilo '';
    
$query $db->simple_select('themestylesheets''*'"name='spoiler.css'");
    
$query_tid $db->write_query("SELECT tid FROM ".TABLE_PREFIX."themes WHERE def='1'");
    
$themetid $db->fetch_array($query_tid);
    if (
count($db->fetch_array($query)))
    {
        
$editar_estilo '(<a href="index.php?module=style-themes&action=edit_stylesheet&tid='.$themetid['tid'].'&file=spoiler.css&mode=advanced">Editar la hoja de estilo</a>)';
    }

    
// Añadimos la información del plugin.
    
    
return array(
        
"name"                => "MyCode: MySpoiler"// Nombre del plugin.
        
"description"        => "It allows to insert the spoiler´s function in messages. {$editar_estilo}"// Descripción del plugin.
        
"website"            => "http://www.soportemybb.com/tema_Plugin-MySpoiler-Permite-insertar-la-función-spoiler-en-los-mensajes"// Sitio web del plugin.
        
"author"            => "<b>abdonroda</b></a> for <a href=\"http://www.soportemybb.com\"><b>SoporteMyBB.com</b></a>"// Autor del plugin.
        
"authorsite"        => "http://www.soportemybb.com/"// Sitio web del autor.
        
"version"            => "1.2"// Versión del plugin.
        
"guid"                => "0bc3ccce40451eb1deb187a31ee7432d"// ID del plugin de MyBB.
        
"compatibility"        => "14*,16*"// Compatibilidad del plugin.
    
);
}


function 
myspoiler_activate()
{
    
// Creamos la hoja de estilo para el spoiler.

    
global $db;
    
$query_tid $db->write_query("SELECT tid FROM ".TABLE_PREFIX."themes WHERE def='1'");
    
$themetid $db->fetch_array($query_tid);
    
$estilo = array(
            
'name'         => 'spoiler.css',
            
'tid'          => $themetid['tid'],
            
'attachedto'   => 'showthread.php|newthread.php|newreply.php|editpost.php|private.php|announcements.php',
            
'stylesheet'   => '.spoiler {
    background: #f5f5f5;
    border: 1px solid #bbb;
    margin-bottom: 15px;
}

.spoiler_cabecera {
    border-bottom: 1px solid #bbb;
    margin: 0;
    margin-bottom: 4px;
    background: #ddd;
    padding: 4px 5px;
}

.spoiler_contenido {
    padding: 5px;
    height: auto;
    display: block;
    background: #f5f5f5;
}'
,
            
'lastmodified' => TIME_NOW
        
);
        
$sid $db->insert_query('themestylesheets'$estilo);
        
$db->update_query('themestylesheets', array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'"1);
        
$query $db->simple_select('themes''tid');
        while(
$theme $db->fetch_array($query))
        {
            require_once 
MYBB_ADMIN_DIR.'inc/functions_themes.php';
            
update_theme_stylesheet_list($theme['tid']);
        }
}


function 
myspoiler_deactivate()
{
    
// Borramos la hoja de estilo del spoiler.

    
global $db;
    
$db->delete_query('themestylesheets'"name='spoiler.css'");
        
$query $db->simple_select('themes''tid');
        while(
$theme $db->fetch_array($query))
        {
            require_once 
MYBB_ADMIN_DIR.'inc/functions_themes.php';
            
update_theme_stylesheet_list($theme['tid']);
        }
}


function 
myspoiler_run($mensaje)
{
    
// Creamos el MyCode simple: [spoiler]contenido aquí[/spoiler]

    
while(preg_match('#\[spoiler\](.*?)\[\/spoiler\]#si',$mensaje))
    
$mensaje preg_replace('#\[spoiler\](.*?)\[\/spoiler\]#si','<div class="spoiler">
        <div class="spoiler_cabecera"><button class="button" style="float: right; padding: 0px 5px; font-size: 10px;" onclick="javascript: if(parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display == \'block\'){ parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display = \'none\'; this.innerHTML=\'Mostrar contenido\'; } else { parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display = \'block\'; this.innerHTML=\'Ocultar contenido\'; }">Mostrar contenido</button>Spoiler:</div>
        <div class="spoiler_contenido" style="display: none;">$1</div>
    </div>'
,$mensaje);

    
// Creamos el MyCode complejo con comillas: [spoiler="título aquí"]contenido aquí[/spoiler]

    
while(preg_match('#\[spoiler="(.*?)"\](.*?)\[\/spoiler\]#si',$mensaje))
    
$mensaje preg_replace('#\[spoiler="(.*?)"\](.*?)\[\/spoiler\]#si','<div class="spoiler">
        <div class="spoiler_cabecera"><button class="button" style="float: right; padding: 0px 5px; font-size: 10px;" onclick="javascript: if(parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display == \'block\'){ parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display = \'none\'; this.innerHTML=\'Mostrar contenido\'; } else { parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display = \'block\'; this.innerHTML=\'Ocultar contenido\'; }">Mostrar contenido</button>$1:</div>
        <div class="spoiler_contenido" style="display: none;">$2</div>
    </div>'
,$mensaje);

    
// Creamos el MyCode complejo sin comillas: [spoiler=título aquí]contenido aquí[/spoiler]

    
while(preg_match('#\[spoiler=(.*?)\](.*?)\[\/spoiler\]#si',$mensaje))
    
$mensaje preg_replace('#\[spoiler=(.*?)\](.*?)\[\/spoiler\]#si','<div class="spoiler">
        <div class="spoiler_cabecera"><button class="button" style="float: right; padding: 0px 5px; font-size: 10px;" onclick="javascript: if(parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display == \'block\'){ parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display = \'none\'; this.innerHTML=\'Mostrar contenido\'; } else { parentNode.parentNode.getElementsByTagName(\'div\')[1].style.display = \'block\'; this.innerHTML=\'Ocultar contenido\'; }">Mostrar contenido</button>$1:</div>
        <div class="spoiler_contenido" style="display: none;">$2</div>
    </div>'
,$mensaje);
    
    return 
$mensaje;
}

?>
this is the spanish php code. (it is in the folder called UPLOAD\inc\plugins\)
u can edit "Mostrar Contenido" for "Show content",or "Ocultar contenido" for "Hide content".. !

(8 Apr, 2011, 8:35 am)Jack707 escribió: hey guys...can you help me.... I've added this plugin to my forums : http://malwaretips.com/ ...but the text for the spoiler button it's in spanish ( eg:Mostarar contiendo) ..and I can't seem to change it in english without getting an error in ACP..can you modifiy it to english and post a attachment...or tell me what I need to channge Big Grin

Podías haber hecho lo que te dijo GenghisIV en el mensaje anterior, pero bueno, ya te adjunto aquí el plugin traducido:
[attachment=1954]

Y otra cosa, este foro es de soporte en español, si quieres pedir ayuda has de hacerlo en español. Sino sabes español, usa algún traductor, como el de Google por ejemplo, pero escribe en español.

Saludos. Smile
(16 May, 2011, 8:19 am)Jaizu escribió: Puedo añadirlo sin un Plugin?

Podría hacer un BBCode... Pero no tendría la misma funcionalidad.
Por qué prefieres no usar el plugin? Es un plugin supersencillo que no ocupa nada.
(16 May, 2011, 9:21 am)abdonroda escribió:
(16 May, 2011, 8:19 am)Jaizu escribió: Puedo añadirlo sin un Plugin?

Podría hacer un BBCode... Pero no tendría la misma funcionalidad.
Por qué prefieres no usar el plugin? Es un plugin supersencillo que no ocupa nada.

Si que lo usaré, ese día instalé mi primer Plugin xD
Muy bueno Big Grin
Me alegra poder decir que este plugin ya ha tenido más de 1.000 descargas desde MyBB.com Smile
(28 Jun, 2011, 5:50 pm)abdonroda escribió: Me alegra poder decir que este plugin ya ha tenido más de 1.000 descargas desde MyBB.com Smile

Y como sería para añadirlo al lado de BIU?
Sí, sigue ese tutorial. Smile