News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Shout para smf 1.1.2

Started by malditango, February 24, 2007, 11:36:44 AM

Previous topic - Next topic

C ®oNaLd0

Prueba con el tema default y si aparece quiere decir q todo esta bien, lo unico q tienes q hacer es lo siguiente:

Quote from: yonimh on March 24, 2007, 02:07:20 PM

Foro/Themes/default/languages/sbox.spanish.php

edita eso y edita esto:

$txt['sbox_ModTitle'] = 'aca pon el texto que deseas';

y para que este shoutbox muestre en el theme que deseeas edita:

BoardIndex.template (de tu tema que quieras que se vea  el shoutbox)

y agrega el siguiente codigo despues de:

// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

var foreColor, backEl, backColor;

if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;

backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;

backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}

// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>';
}



agrega esto despues de: }

  // display shoutbox
  if (function_exists('sbox')) sbox();


Salu2 ;)

satelitero80

yo tengo instalado el shout,pero no me aparece en smf 1.1.2 las opciones propias en el admin, para configurarlo

Doro

Sólo hay que hacer una pequeña traducción del mod para que se vea. Enel Modifications.english.php está lo que debes traducir del mod para quese vea. No es difícil, lo pasas al Modifications.spanish.php y lotraduces y subes.


;)
*En buena medida, ser cristiano equivale a ser cruel respecto a uno mismo y a los demás, odiar a quienes piensan de forma diferente, y un afán de perseguir. Ser cristiano implica odiar la inteligencia, el orgullo, la valentía, la libertad, el libertinaje del espíritu; odiar los sentidos, el gozo sensual, el placer en cuanto tal.Friedrich Nietzsche

satelitero80

Quote from: Doro on June 28, 2007, 12:47:59 PM
Sólo hay que hacer una pequeña traducción del mod para que se vea. Enel Modifications.english.php está lo que debes traducir del mod para quese vea. No es difícil, lo pasas al Modifications.spanish.php y lotraduces y subes.


;)


ok,lo copio o lo corto y pego al spanish,otra cosa alguien que lo tenga traducido o me lo traduzca

Quote<?php
// Version: 1.1; Modifications


// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array( '/help'      &nbsp; &nbsp;=>    ' [command]: Help on a command, or all if no command is specified.',
               '/return'    =>   &nbsp; &nbsp;': Go back to the Shout Box.',
               '/pi'       =>   &nbsp; &nbsp;' [digits]: What is the value of pi to the nth digit?',
               '/me'       =>   &nbsp; &nbsp;' <message>: Emotes the message (e.g. <font color="red"> * Nathaniel likes dogs</font>)');
$txt['yshout_cmdlistadmin'] = array('/clear'   =>   &nbsp; ': Completely empty the Shout Box.',
                  '/help'      &nbsp; &nbsp;=>    ' [command]: Help on a command, or all if no command is specified.',
                  '/return'    =>   &nbsp; &nbsp;': Go back to the Shout Box.',
                  '/banlist'   &nbsp; =>   ': List all bans currently in place. Unban the users by clicking on their names.',
                  '/banuser'   &nbsp; =>   ' <mode> <username>: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
                  '/banip'   =>   &nbsp; ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
                  '/impersonate'=>' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
                  <user>: Username to use<br />
                  [userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
                  [ip]: IP address to use, as 1.2.3.4<br />
                  [userid]: User ID from forum, to fix profile link</blockquote>');

// ---- End modification - nneonneo's Shoutbox ----
?>

SouLFury

#64
a mi este mod solo me funciona con FIREFOX

con explorer le doy a enviar mensaje pero no aparece... alguien sabe algo?


saludos
http:/www.pubunderground.info

kr5323

#65
Quote from: vitalian on May 03, 2007, 11:50:39 AM
Prueba con el tema default y si aparece quiere decir q todo esta bien, lo unico q tienes q hacer es lo siguiente:

Quote from: yonimh on March 24, 2007, 02:07:20 PM

Foro/Themes/default/languages/sbox.spanish.php

edita eso y edita esto:

$txt['sbox_ModTitle'] = 'aca pon el texto que deseas';

y para que este shoutbox muestre en el theme que deseeas edita:

BoardIndex.template (de tu tema que quieras que se vea  el shoutbox)

y agrega el siguiente codigo despues de:

// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

var foreColor, backEl, backColor;

if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;

backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;

backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}

// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>';
}



agrega esto despues de: }

  // display shoutbox
  if (function_exists('sbox')) sbox();


Salu2 ;)

Genial, me ha funcionado. Muchas gracias.

Sólo una pregunta, al hacer lo que has indicado, las líneas del chat me aparecen en el nuevo theme CENTRADAS, mientras que si pongo el default me aparecen alineadas a la izquierda. Me gusta más esta opción ... ¿qué tendría que hacer para que se alineen a la izquierda????



Saludos.


EDITO: Mi theme es PDX.

-DPS-

yo para q se me muestre tengo q borrar el boardindex pq sino no se me muestra, tengo dillber MC, que hago :(

Tuon

como hago para que este shout sea visible.. en todas partes..
me explico.. para que al entrar el un subforo.. siga visible..??

JCS

aca tienes el archivo para el 1.1.4, si no te sirve avisa xD


Dont PM me for support, unless I ask you to do that

OtaKumi
Hacks-Park

foxit2007

a my me da erro

The requested URL /galactico\Sources/sboxDB.php was not found on this server.

smf 1.1.4

help

robertinyo

Hay alguna posibilidad de que el chat solo sea visible a un grupo determinado de usuarios, por ejemplo, solo los moderadores....

JCS

si claro, restringiendolo con un if, asi q antes de eso, pones

if allowedto(moderate forum)

echo
el shout

y se supone q asi solo se mostrara a los mods, busca bien la funcion allowed to, q la vd ahora no recuerdo muy bien y ademas tengo sueño jaja
Dont PM me for support, unless I ask you to do that

OtaKumi
Hacks-Park

dannbass

Seria mejor que con usen del todo esta modificacion porque tiene agujeros grandes de seguridad y es muy facil hackear el foro, inclusive con los arreglos que andan dando vueltas.

Por algo que es ya no hay soporte y no se encuentra para descargar en la parte de modificaciones.

No la usen de verdad!!!!

Advertisement: