4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)

[MOD] Shoutbox

(1/54) > >>

f1do:
Shoutbox v1.1

Version history:
#V1.1
-Various security fixes (Special thanks to TheOracle)
-New editor engine
---------------------------------------------------------------------------------------------------------
Features:
    -Automated installation
    -Admin Panel
       -Activate/Desactivate shutbox
       -Optional allow guests to shout
       -Optional BBcode
       -Optional HTML
    -Totaly editable template
    -Users can edit their shouts
    -Users can delete their shouts
    -Language support:
       -English
       -Spanish
       -German(by mawenzi)
       -Note, if anybody translate it to another language, PM me and I´ll post it here and credit you of ourse.
Download: http://www.f1do.york-networks.com/gallery/shoutboxmod/
Sample site: http://www.f1do.york-networks.com/gallery/
Admin user:-username: test
                 -password: test
---------------------------------------------------------------------------------------------------------
New files to upload:
/shout_editor.php
/includes/shout.php
/admin/plugins/shoutbox_admin.php
/templates/your_template/shout_bit.html
/templates/your_template/shout_form.html
/templates/your_template/shout_editor.html

-------------------------------------------------------------------------------------------------------
Files to edit:
/includes/constants.php
/includes/page_header.php
/lang/your_language/main.php
/lang/your_language/admin.php
/templates/your_template/style.css
/templates/your_template/header.html
(optional)/templates/your_template/home.html
(optional)/templates/your_template/categories.html
(optional)/templates/your_template/details.html
(optional)/templates/your_template/lightbox.html
(optional)/templates/your_template/member.html

------------------------------------------------------------------------------------------------------
Instalation:
1 Edit files
1.1 Open /includes/page_header.php

Find:

--- Code: ---//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
--- End code ---

Before Add:

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------

include (ROOT_PATH.'includes/shout.php');
--- End code ---

1.2 Open /templates/your_template/style.css

Find:

--- Code: ---/*--Categories------------------------------------------------*/
--- End code ---

Before add:

--- Code: ---/*--Shoutbox--------------------------------------------------*/
.shouts {
border: 1px;
border-style:solid;
border-color: #004C75;
height: 120px;
width: 148px;
padding: 0px;
overflow: auto;
}

.shoutinput {
  background-color: #FFFFFF;
  font-family: Tahoma,Verdana,Arial,Helvetica,sans-serif;
  color: #0f5475;
  font-size: 11px;
  WIDTH: 130px;
}

.shouttextarea {
  font-family: Tahoma,Verdana,Arial,Helvetica,sans-serif;
  color: #0f5475;
  font-size: 11px;
}
--- End code ---

1.3 Open /templates/your_template/header.html

Find:

--- Code: ---if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
--- End code ---

After add:

--- Code: ---  function popup(mylink, windowname) {
    if (! window.focus)return true;
      var href;
    if (typeof(mylink) == 'string')
      href=mylink;
    else
      href=mylink.href;
    window.open(href, windowname, 'width=170,height=240,scrollbars=no');
    return false;
  }
--- End code ---

Open /includes/constants.php

Find:
--- Code: ---define('WORDMATCH_TABLE', $table_prefix.'wordmatch');
--- End code ---

Add after:
--- Code: ---define('SHOUTBOX_TABLE', $table_prefix.'shoutbox');
--- End code ---


2 Languge configuration
2.1 Open /lang/your_language/main.php

Find:

--- Code: ---?>
--- End code ---

Before add(ONLY YOUR LANGUAGE):
[ENGLISH]

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------
$lang['shoutbox'] = "Shoutbox";
$lang['sh_e_nouser'] = "Please insert a name.";
$lang['sh_e_nomessage'] = "Please insert a message.";
$lang['sh_e_usrlgth'] = "The name should be shorter than ".$config['sh_usr_lgth']." characters.";
$lang['sh_e_msglgth'] = "The message should be shorter than ".$config['sh_msg_lgth']." words.";
$lang['sh_e_inactive'] = "Sorry, the shoutbox is disabled for the timebeing.";
$lang['sh_e_register'] = "Please register to use the shoutbox";
$lang['sh_name'] = "Name:";
$lang['sh_message'] = "Message:";
$lang['sh_edit'] = "Edit";
$lang['sh_edited'] = "Shout Edited";
$lang['sh_delete'] = "Delete";
$lang['sh_ask_delete'] = "Delete Shout?";
$lang['sh_deleted'] = "The shout was deleted";
$lang['sh_close'] = "[Close Window]";
--- End code ---

[SPANISH]

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------
$lang['shoutbox'] = "Shoutbox";
$lang['sh_e_nouser'] = "Escribe un nombre por favor.";
$lang['sh_e_nomessage'] = "Escribe un mensaje por favor.";
$lang['sh_e_usrlgth'] = "El nombre debe ser de menos de ".$config['sh_usr_lgth']." caracteres.";
$lang['sh_e_msglgth'] = "El mensaje debe ser de menos de ".$config['sh_msg_lgth']." palabras.";
$lang['sh_e_inactive'] = "Lo siento, pero el Shoutbox esta desabilitado en este momento.";
$lang['sh_e_register'] = "Por favor, registrese para usar la shoutbox";
$lang['sh_name'] = "Nombre:";
$lang['sh_message'] = "Mensaje:";
$lang['sh_edit'] = "Editar";
$lang['sh_edited'] = "Shout Editado";
$lang['sh_delete'] = "Borrar";
$lang['sh_ask_delete'] = "Borrar mensaje?";
$lang['sh_deleted'] = "El mensaje fue borrado";
$lang['sh_close'] = "[Cerrar Ventana]";
--- End code ---

[GERMAN](by mawenzi)

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------
$lang['shoutbox'] = "Shoutbox";
$lang['sh_e_nouser'] = "Bitte trage deinen Namen ein.";
$lang['sh_e_nomessage'] = "Bitte trage eine Nachricht ein.";
$lang['sh_e_usrlgth'] = "Der Name sollte kürzer sein als ".$config['sh_usr_lgth']." Buchstaben.";
$lang['sh_e_msglgth'] = "Die Nachricht sollte kürzer sein als ".$config['sh_msg_lgth']." Wörter.";
$lang['sh_e_inactive'] = "Sorry, die Shoutbox ist vorläufig gesperrt.";
$lang['sh_e_register'] = "Bitte registriere dich, um die Shoutbox zu nutzen.";
$lang['sh_name'] = "Name:";
$lang['sh_message'] = "Nachricht:";
$lang['sh_edit'] = "Edit";
$lang['sh_edited'] = "Nachricht bearbeiten?";
$lang['sh_delete'] = "Delete";
$lang['sh_ask_delete'] = "Nachricht löschen?";
$lang['sh_deleted'] = "Die Nachricht wurde gelöscht";
$lang['sh_close'] = "[schließen]";
--- End code ---


2.2 Open: /lang/your_language/admin.php

Find:

--- Code: ---?>
--- End code ---

Add before(ONLY YOUR LANGUAGE):

[ENGLISH]

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------
$lang['sh_not_updated'] = "Settings couldn't be updated";
$lang['sh_not_installed'] = "Installation couldn't be completed";
$lang['sh_cfg'] = "Shoutbox Configuration";
$lang['sh_activate'] = "Activate Shoutbox";
$lang['sh_allow_guests'] = "Allow guests to post";
$lang['sh_usr_lgth'] = "Username Length(less than 50 characters)";
$lang['sh_msg_lgth'] = "Message Length(in words)";
$lang['sh_wordwrap'] = "wordwrap";
$lang['sh_bbcode'] = "Allow BBcode";
$lang['sh_bbimg'] = "Allow BBcode images";
$lang['sh_html'] = "Allow HTML";
$lang['sh_msg_display'] = "Cuantity of shouts to display on the template";
$lang['sh_install'] = "Install Shoutbox";
$lang['sh_installed'] = "The shoutbox is installed and configured";
$lang['sh_back'] = "Back to Shoutbox Admin";
$lang['sh_currnt'] = "<h1>Current Shouts</h1>\n";
$lang['sh_deletes'] = "Delete";
$lang['sh_number'] = "Shout Number";
$lang['sh_name'] = "Name";
$lang['sh_message'] = "Message";
$lang['sh_date'] = "date";
$lang['sh_options'] = "Options";
$lang['sh_delete'] = "Delete Shouts";
$lang['sh_deleted'] = "The Shouts where deleted \n";
$lang['sh_update'] = "Update Settings";
$lang['sh_updated'] = "Settings Updated \n";
--- End code ---

[SPANISH]

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------
$lang['sh_not_updated'] = "La configuracion no pudo ser guardada";
$lang['sh_not_installed'] = "No se pudo completar la instalación";
$lang['sh_cfg'] = "Configuración de la Shoutbox";
$lang['sh_activate'] = "Activar la Shoutbox";
$lang['sh_allow_guests'] = "Permitir que visiantes manden mensajes";
$lang['sh_usr_lgth'] = "Longitud Del Nombre(menor que 50 caracteres)";
$lang['sh_msg_lgth'] = "Longitud Del Mensaje(en palabras)";
$lang['sh_wordwrap'] = "wordwrap";
$lang['sh_bbcode'] = "Permitir BBcode";
$lang['sh_bbimg'] = "permitir imagenes BBcode";
$lang['sh_html'] = "Permitir HTML";
$lang['sh_msg_display'] = "Cantidad de mensajes para mostrar";
$lang['sh_install'] = "Instalar la Shoutbox";
$lang['sh_installed'] = "La Shoutbox está instalada y configurada";
$lang['sh_back'] = "Volver al administrador de la shoutbox";
$lang['sh_currnt'] = "<h1>Mensajes</h1>\n";
$lang['sh_deletes'] = "Borrar";
$lang['sh_number'] = "Numero de mensaje";
$lang['sh_name'] = "Nombre";
$lang['sh_message'] = "Mensaje";
$lang['sh_date'] = "Fecha";
$lang['sh_options'] = "Opciones";
$lang['sh_delete'] = "Borrar Mensajes";
$lang['sh_deleted'] = "Los Mensajes Fueron Borrados \n";
$lang['sh_update'] = "Guardar Configuración";
$lang['sh_updated'] = "Configuración guardada \n";
--- End code ---

[GERMAN](by mawenzi)

--- Code: ---//-----------------------------------------------------
//--- Shoutbox ----------------------------------------
//-----------------------------------------------------
$lang['sh_not_updated'] = "Die Einstellungen konnten nicht aktualisiert werden.";
$lang['sh_not_installed'] = "Die Installation konnte nicht durchgef&uuml;hrt werden.";
$lang['sh_cfg'] = "Shoutbox Einstellungen";
$lang['sh_activate'] = "Shoutbox aktivieren";
$lang['sh_allow_guests'] = "G&auml;ste d&uuml;rfen posten";
$lang['sh_usr_lgth'] = "Username L&auml;nge(weniger als 50 Buchstaben)";
$lang['sh_msg_lgth'] = "Nachricht L&auml;nge(in W&ouml;rtern)";
$lang['sh_wordwrap'] = "Zeilenumbruch";
$lang['sh_bbcode'] = "BBCode erlauben";
$lang['sh_bbimg'] = "BBCode Bilder erlauben";
$lang['sh_html'] = "HTML erlauben";
$lang['sh_msg_display'] = "Anzahl der Nachrichten, die im Template angezeigt werden sollen.";
$lang['sh_install'] = "Shoutbox installieren";
$lang['sh_installed'] = "Die shoutbox ist installiert und konfiguriert.";
$lang['sh_back'] = "Zur&uuml;ck zur Shoutbox Administration";
$lang['sh_currnt'] = "<h1>Aktuelle Shouts</h1>\n";
$lang['sh_deletes'] = "L&ouml;schen";
$lang['sh_number'] = "Shout Nummer";
$lang['sh_name'] = "Name";
$lang['sh_message'] = "Nachricht";
$lang['sh_date'] = "Datum";
$lang['sh_options'] = "Optionen";
$lang['sh_delete'] = "Nachrichten l&ouml;schen";
$lang['sh_deleted'] = "Die Nachrichten wurden gel&ouml;scht \n";
$lang['sh_update'] = "Aktualisiere Einstellungen";
$lang['sh_updated'] = "Einstellungen wurden aktualisiert \n";
--- End code ---

3 Template configuration

To show The shoutbox all you have to do is insert the code where you want the shoutbox to be. If you put it right after "{endif random_image}" it will look like the sample site. You may edit this code to suit your needs, you can also edit the shout_bit.html and shout_form.html.
I have tried it in home.html, categories.html, details.html, lightbox.html and member.html. I also tried it in the header.html.
One tip: remember to make the width of the table inside the <div> smaller than the width of the <div>(editable in style.css), so that the bottom scrolling bar doesnt appear.


--- Code: ---<!-- Shoutbox Begin -->
  <table width="148" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_shoutbox}</td>
    </tr>
    <tr>
      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
    </tr>
    <tr>
      <td>
    <div class="shouts">
        <table cellpadding="0" cellspacing="0" width="130">
        {shoutings}
        </table>
        </div>
      </td>
    </tr>
    <tr>
     <td align="center" class="row1">
     {shout_form}
     </td>
   </tr>
   <tr>
     <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
   </tr>
 </table>
<!-- Shoutbox End -->
--- End code ---

4 Finishing up
Save and upload all files to their corresponding folder.Now login and go to the Control Panel. In the left, under PlugIns, there should be a link: "Shoutbox Admin". There, you have the configuration options, edit them to your needs and click in "Install Shoutbox". Now the settings have been saved, and the shoutbox table has been created.

Stoleti:
wooooow awesome !!!  :mrgreen:

Stoleti:
one problem .... you've forgot the DB Table .... (4images_shoutbox.....) .... :?:

mawenzi:

--- Quote from: Stoleti on November 23, 2005, 05:41:35 PM ---one problem .... you've forgot the DB Table .... (4images_shoutbox.....) .... :?:

--- End quote ---


--- Quote from: f1do on November 23, 2005, 04:38:08 PM ---... There, you have the configuration options, edit them to your needs and click in "Install Shoutbox". Now the settings have been saved, and the shoutbox table has been created.

--- End quote ---

PS. very nice feature ... thanks for that ... :wink:

Stoleti:
ops...sorry......i've forgot check that ........  8O

Navigation

[0] Message Index

[#] Next page

Go to full version