News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ultimate Shoutbox

Started by Grudge, March 28, 2004, 09:11:20 AM

Previous topic - Next topic

L0relei

Quote from: CrayZ on February 01, 2006, 04:34:40 AM
The first one is where is the file that I can do the translation
Modifications.<your language>.php
Open the file .mod in the package with a text editor and search for :
<edit file>
$languagedir/Modifications.english.php
</edit file>

<search for>
?>
</search for>

<add before>
After these lines is the text to translate.
Quote from: CrayZ on February 01, 2006, 04:34:40 AM
and the second if possible where is the place so i can change the backround colour.
shout.template.php
Just Lo` It

Menni

Can someone tell me what should I modify to make shoutbox look like my chatboard? Meaning colors. Now it is way too dark.

CrayZ

I found the file and I did the translation so I went to uplad it one the server and I saw that the file is like this: shout_v111.33.tar.gz

WinRar can extract files from the tar.gz but can't put them back again  :-\

I tryed to find if i had a Modification folder or something on my server but Im sure that the shout_v111.33.tar.gz that this is the source of them mode or not  :(

I don't know  :'(

vodkarev

you can create a zip file with winrar... or do what I did... do a manual install

L0relei

CrayZ, it seems that you didn't understand what I was trying to explain. The file .mod tells you the text to translate, you just have to copy the translation in the file Modsettings.<your language>.php
Just Lo` It

Menni

echo '
<p><a href="', $scripturl, '?action=shout_archive">', $txt['shoutbox_43'], '</a></p>
</center>';

Where should I put this to make it on same line with shout! and messagewindow?

Prasad007

I really prefer chat over a shoutbox. Thanks tho. Nice mod! :)

ToyDozer

Who can help me or atleast explain to me why I have so much blank space below my "view all" "message" and "shout" fields.

If in my shout.template.php file I remove </form> from the tables conclusion it gets rid of most of the wasted space though in doing that it ofcourse fouls all sorts of things up. Heres how it looks and heres the code block from my shout.template file...

function template_shout_form()
{
global $context, $settings, $options, $txt, $user_info, $scripturl, $modSettings, $ID_MEMBER;

echo '
<center>
<form action="', $scripturl, '?action=shout" method="post">
<input type="hidden" value="', $context['qstr'], '" name="qstr" />
<input type="hidden" value="" name="email" />';

if ($user_info['is_guest'])
{
echo '
<input type="hidden" value="0" name="memberID" />
<input type="text" value="', $txt['shoutbox_6'], '" name="displayname" maxlength="100" onfocus="this.value=\'\'" /><br />';

if (empty($modSettings['shout_noGuestEmail']))
echo '
<input type="text" value="', $txt['shoutbox_7'], '" name="email" maxlength="100" onfocus="this.value=\'\'" /><br />';
}
else
echo '
<input type="hidden" value="', $user_info['name'], '" name="displayname" />
<input type="hidden" value="', $ID_MEMBER, '" name="memberID" />';

echo '
<td>
<input type="text" value="', $txt['shoutbox_8'], '" name="message" size="60" maxlength="300" onfocus="if (this.value == \'', $txt['shoutbox_8'], '\')this.value=\'\'" /><br />
</td><td>
<input type="submit" name="submit" value="', $txt['shoutbox_9'], '" />
</td></tr></table></form>
</center>';

Thanks in advance for any assistance...
Jon S.
Jon Stensaa
www.wheelingadventures.com [nofollow]
[email protected]
Accelerator : The stomped out hole in the floarboard!!!!

CrayZ

#788
This mode just look grate thanks  ;D

Thank you L0relei for the big help.

Now next question  :D

Is any way so we can insrert a link for the smileys  ??? ::)

I think this will be great because for a fourm that has lots of smileys is hard to remember a code for all of them.

Any one any idea  ???

Thanks  :)

Menni

Can somebody help?
What should I modify to align shotbox text to left side of the box?
Now text is in the middle?

CrayZ

Go tou your Admin Pannel and then go to Features and Options and then go to Shouts and there is a place Scrolling direction probably has to be left  :-\

I used this one http://www.simplemachines.org/community/index.php?topic=8415.765 the code from L0relei and now look grate.

I think you have to create a new shout.template.php with his code and disable scrilling from dhe admin menu. It will be greate i think.


Menni

Quote from: CrayZ on February 02, 2006, 07:27:28 AM
Go tou your Admin Pannel and then go to Features and Options and then go to Shouts and there is a place Scrolling direction probably has to be left  :-\
No, that is the scrolling direction. I mean text align in the shotbox.

CrayZ

That's whay I told you to crate a new shout.template.php tha one that L0relei posted and the text will go to the left.

sobers_2002

hi all

i just installed the shoutbox and there seems to some strange thing. The board is 1.0.6 and i don't see any menu in admincp for shoutbox!!! kindly guide me about this.

thanks
Saurabh

Menni

Quote from: ToyDozer on February 01, 2006, 04:20:51 PM
Who can help me or atleast explain to me why I have so much blank space below my "view all" "message" and "shout" fields.

If in my shout.template.php file I remove </form> from the tables conclusion it gets rid of most of the wasted space though in doing that it ofcourse fouls all sorts of things up. Heres how it looks and heres the code block from my shout.template file...

function template_shout_form()
{
global $context, $settings, $options, $txt, $user_info, $scripturl, $modSettings, $ID_MEMBER;

echo '
<center>
<form action="', $scripturl, '?action=shout" method="post">
<input type="hidden" value="', $context['qstr'], '" name="qstr" />
<input type="hidden" value="" name="email" />';

if ($user_info['is_guest'])
{
echo '
<input type="hidden" value="0" name="memberID" />
<input type="text" value="', $txt['shoutbox_6'], '" name="displayname" maxlength="100" onfocus="this.value=\'\'" /><br />';

if (empty($modSettings['shout_noGuestEmail']))
echo '
<input type="text" value="', $txt['shoutbox_7'], '" name="email" maxlength="100" onfocus="this.value=\'\'" /><br />';
}
else
echo '
<input type="hidden" value="', $user_info['name'], '" name="displayname" />
<input type="hidden" value="', $ID_MEMBER, '" name="memberID" />';

echo '
<td>
<input type="text" value="', $txt['shoutbox_8'], '" name="message" size="60" maxlength="300" onfocus="if (this.value == \'', $txt['shoutbox_8'], '\')this.value=\'\'" /><br />
</td><td>
<input type="submit" name="submit" value="', $txt['shoutbox_9'], '" />
</td></tr></table></form>
</center>';

Thanks in advance for any assistance...
Jon S.



I did that. Can some one tell me what am I doing wrong?
http://www.hiekkalaatikko.net/testifoorumi/index.php

Menni

So, this is what I want:

And this is what I get:

How and what should I modify to get text aligned right? ::)
Also want message, shout and wiew all to same line, so not so much space is needed.

Somebody? Help :-[
And this is my shout.template:

<?php

function template_shout_archive()
{
global $context$settings$options$txt$user_info$scripturl$modSettings;

echo '
<form action="'
$scripturl'?action=delete_shout'$context['url_direct'], '" method="post">
<table border="0" cellspacing="1" cellpadding="3" align="center" width="100%" class="borderclass">
<tr>
<td class="catbg" colspan="'
, !empty($context['canDelete']) ? 1'" align="center">'$txt['shoutbox_1'], '</td>
</tr><tr>
<td class="titlebg" colspan="'
, !empty($context['canDelete']) ? 1'" align="left">'$context['page_index'], '</td>
</tr>'
;

$alternate false;
foreach ($context['arc_shouts'] as $shout)
{
echo '
<tr class="'
$alternate 'windowbg' 'windowbg2''">
<td>'
;

if (!empty($context['canDelete']))
echo '
<a href="'
$scripturl'?action=delete_shout;id='$shout['id'], $context['url_direct'], '"><img src="'$settings['images_url'], '/deleteshout.gif" border="0" alt="X"></a>';
echo '
<span>'
$shout['time'], '</span> - '$shout['link'], ' -' $shout['message'];
echo '
</td>'
;

if (!empty($context['canDelete']))
echo '
<td width="4%" align="center">
<input type="checkbox" name="ind_delete[]" value="'
$shout['id'], '" class="check" />
</td>'
;
echo '
</tr>'
;

$alternate = !$alternate;
}
echo '
<tr>
<td class="windowbg" colspan="'
, !empty($context['canDelete']) ? 1'" align="left" width="100%">
<div style="float: left">'
$context['page_index'], '</div>
<div style="float: right">
'
$context['canDelete'] ? '<input type="submit" value="' $txt['shout_delete_selected'] . '" name="delete_sel" />' '''
</div>
</td>
</tr>
<tr class="windowbg">
<td colspan="2">
<center>'
;

if ($modSettings['enablearchiveshout'] == && $context['canPost'])
template_shout_form();

echo '
</center>
</td>
</tr>
</table>
</form>'
;

// Pull the delete options for the administrator
if (!empty($context['canDelete']))
echo '
<p><table border="0" cellspacing="1" cellpadding="4" align="center" width="100%">
<tr>
<td class="catbg" align="center" colspan="2">'
$txt['shoutbox_42'], '
</td>
</tr>
<tr>
<td class="windowbg2" valign="top" width="50%">
<form action="'
$scripturl'?action=delete_shout_age" method="post">'$txt['shoutbox_2'], '
<input type="text" name="age" id="age" value="25" size="4" /> '
$txt['shoutbox_3'], '
</td>
<td class="windowbg2" valign="top">
<input type="submit" name="submit" value="'
$txt['shoutbox_5'], '" />
</form><br />
</td>
</tr><tr>
<td class="windowbg2" valign="top" width="50%">
<form action="'
$scripturl'?action=delete_all_shouts" method="post">'$txt['shoutbox_4'], ' '$modSettings['shoutlimit'], '
</td>
<td class="windowbg2" valign="top">
<input type="submit" name="submit" value="'
$txt['shoutbox_5'], '" />
</form>
</td>
</tr>
</table></p>'
;
}

function 
template_shout_box()
{
global $context$settings$options$txt$user_info$scripturl$modSettings$forum_version;

// Only do auto refresh if we have it enabled!
if (!empty($modSettings['shout_enableXML']))
{
// The code for handling auto refresh
if ($forum_version 'SMF 1.1')
echo '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script_shout.js?1.03"></script>';

echo '
<script language="JavaScript1.2" type="text/javascript"><!--
setTimeout("doAutoReload();", 5000);

function doAutoReload()
{
if (window.XMLHttpRequest)
{
getXMLDocument("'
$scripturl'?action=shout_xml;xml", onDocReceived);
setTimeout("doAutoReload();", 5000);
}
}
function onDocReceived(XMLDoc)
{
// Where we create our new shouts.
var insertData = \'\';
// Number of shouts.
var numShouts = XMLDoc.getElementsByTagName("shout").length;
// Useful vars.
var shoutID, shoutMemberName, shoutMemberID, shoutMemberEmail, shoutCanDelete, shoutTime, shoutLink, shoutMessage;

// Do each shout in turn.
for (i = 0; i < numShouts; i++)
{
shoutID = XMLDoc.getElementsByTagName("shout")[i].getAttribute("id");

// If this shout exists... continue.
if (document.getElementById("shout_" + shoutID))
continue;

shoutMemberName = XMLDoc.getElementsByTagName("shout")[i].getAttribute("member_name");
shoutMemberID = XMLDoc.getElementsByTagName("shout")[i].getAttribute("member_id");
shoutMemberEmail = XMLDoc.getElementsByTagName("shout")[i].getAttribute("member_email");
shoutCanDelete = XMLDoc.getElementsByTagName("shout")[i].getAttribute("can_delete");
shoutTime = XMLDoc.getElementsByTagName("shout")[i].getAttribute("time");
shoutMessage = XMLDoc.getElementsByTagName("shout")[i].getAttribute("message");
shoutLink = XMLDoc.getElementsByTagName("shout")[i].getAttribute("link");

insertData = 
\'<div id="shout_\' + shoutID + \'">\';
if (shoutCanDelete)
insertData += \'<a href="'
$scripturl'?action=delete_shout;id=\' + shoutID + \'"><img src="'$settings['images_url'], '/deleteshout.gif" border="0" alt="X"></a> \';

insertData += shoutTime + \' \' + shoutLink + \' -\' + shoutMessage + \''
$modSettings['shoutsep'], '</div>\';';

// Do the actual insert.
if ($modSettings['shoutdir'] == 0)
echo '
setOuterHTML(document.getElementById("new_shout"), \'<span id="new_shout"></span>\' + insertData);'
;
else
echo '
setOuterHTML(document.getElementById("new_shout"), insertData + \'<span id="new_shout"></span>\');'
;
echo '
}
}
//--></script>'
;
}

echo '
<center>'
;
// Scrolling?
if ($modSettings['enablescrollshout'] == 1)
echo '
<marquee direction="'
$modSettings['shoutscrolldir'], '" width="'$modSettings['shoutscrollwidth'], '" 
height="'
$modSettings['shoutscrollheight'], '" scrollamount="'$modSettings['shoutscrollspeed'], '" 
scrolldelay="'
$modSettings['shoutscrolldelay'], '" onmouseover="this.stop()" onmouseout="this.start()">';

// Insert the shouts, top or bottom depending on direction.
if ($modSettings['shoutdir'] == 0)
echo '
<span id="new_shout"></span>'
;

// Loop through the shouts!
foreach ($context['shouts'] as $shout)
{
echo '
<div id="shout_'
$shout['id'], '">';
// If it's an admin - they get the delete button...
if (!empty($context['canDelete']))
echo '
<a href="'
$scripturl'?action=delete_shout;id='$shout['id'], $context['url_direct'], '"><img src="'$settings['images_url'], '/deleteshout.gif" border="0" alt="X"></a>';
echo '
'
$shout['time'], ' '$shout['link'], ' -'$shout['message'] . $modSettings['shoutsep'];
echo '
</div>'
;

}
// For inserting new shouts...
if ($modSettings['shoutdir'] != 0)
echo '
<span id="new_shout"></span>'
;

// End the marquee?
if ($modSettings['enablescrollshout'] == 1)
echo '
</marquee>'
;

echo '
<p><a href="'
$scripturl'?action=shout_archive">'$txt['shoutbox_43'], '</a></p>
</center>'
;
}

function 
template_shout_form()
{
global $context$settings$options$txt$user_info$scripturl$modSettings$ID_MEMBER;

echo '
<center>
<form action="'
$scripturl'?action=shout" method="post">
<input type="hidden" value="'
$context['qstr'], '" name="qstr" />
<input type="hidden" value="" name="email" />'
;

if ($user_info['is_guest'])
{
echo '
<input type="hidden" value="0" name="memberID" />
<input type="text" value="'
$txt['shoutbox_6'], '" name="displayname" maxlength="100" onfocus="this.value=\'\'" /><br />';

if (empty($modSettings['shout_noGuestEmail']))
echo '
<input type="text" value="'
$txt['shoutbox_7'], '" name="email" maxlength="100" onfocus="this.value=\'\'" /><br />';
}
else
echo '
<input type="hidden" value="'
$user_info['name'], '" name="displayname" />
<input type="hidden" value="'
$ID_MEMBER'" name="memberID" />';

echo '
<input type="text" value="'
$txt['shoutbox_8'], '" name="message" size="16" maxlength="100" onfocus="if (this.value == \''$txt['shoutbox_8'], '\')this.value=\'\'" />
<input type="submit" name="submit" value="'
$txt['shoutbox_9'], '" />
</form>
</center>'
;

}

// This template handles the xml refresh things...
function template_xml_shout()
{
global $context$settings$options$txt$modSettings;

echo '<''?xml version="1.0" encoding="'$context['character_set'], '"?''>
<smf>'
;
foreach ($context['shouts'] as $shout)
{
echo '
<shout id="'
$shout['id'], '" can_delete="'$context['canDelete'], '" time="'$shout['time'], '" member_email="'$shout['email'], '" member_id="'$shout['memberID'], '" member_name="'$shout['displayname'], '" message="'$shout['message'], '" link="'$shout['link'], '" />';
}
echo '
</smf>'
;
}

?>

sobers_2002

hi guys

i posted above, i think i found a little of the problem. I am using 1.0.6 board, and opening the mod edit files, leads to the fact that the editing format is probably according to the latest one and hence can't be done for the 1.0.6 board. So can som1 gimme a package file for 1.0.6??? or perhaps explain me how to edit the modsettings.php according to the latest package??

thanks
Saurabh

Aitsukai

I don't suppose you could help me here?

I'm using 1.1 RC2. I've got a JavaScript thingy set up to open a new window with the shoutbox, and a link in the top navbar to direct to said JavaScript thingy. The thing is, what should I make it open in the JavaScript window?

Thanks any help. ^_^;

kikkok

#798
What happen?
hxxp:www.korkwai.com/ [nonactive]

kikkok

#799
8: Undefined index: url_direct
file: /usr/local/psa/home/vhosts/korkwai.com/subdomains/board/httpdocs/Themes/default/shout.template.php (eval?)
line: 185


and

2: call_user_func(ShoutArchive): First argument is expected to be a valid callback
file: /usr/local/psa/home/vhosts/korkwai.com/subdomains/board/httpdocs/index.php
line: 127
hxxp:www.korkwai.com/ [nonactive]

Advertisement: