I'm not a coder so this is becoming quite difficult, I thought I might need to add
somewhere but I can't quite figure out where.
function EzBlockShoutBoxBlock($paramters = array(), $numberofShouts = 10, $iframe = false)
{
global $txt, $db_prefix, $ezpSettings, $scripturl, $context, $user_info, $settings, $modSettings;
// Check if shoutbox is enabled
if ($ezpSettings['ezp_shoutbox_enable'] == 0)
{
echo $txt['ezp_shoutbox_error_disabled'];
return;
}
// Pass all the parematers
foreach($paramters as $myparam)
{
if ($myparam['parameter_name'] == 'numberofShouts')
$numberofShouts = (int) $myparam['data'];
}
$adminShoutBox = allowedTo('admin_forum');
$useIframe = empty($ezpSettings['ezp_shoutbox_refreshseconds']) ? false : true;
if ($context['browser']['is_ie6'] == true || $context['browser']['is_gecko'] == true || strpos($_SERVER['HTTP_USER_AGENT'], 'WebKit') !== false)
{
$iframe = false;
$useIframe = false;
}
// Show latest shouts
if ($iframe == false)
{
echo '<table style="width: 100%;table-layout: fixed;">
<tr>
<td>
<div style="overflow: auto;">';
}
if ($useIframe == true && $iframe == false)
echo '<iframe src="' . $scripturl . '?action=ezportal;sa=shoutframe;num=' . $numberofShouts . '" frameborder="0" width="100%" height="100%">';
if ($useIframe == true && $iframe == false)
{
}
else
{
$dbresult = db_query("
SELECT
s.shout, s.date, s.id_shout, s.id_member, m.realName, mg.onlineColor, mg.ID_GROUP
FROM {$db_prefix}ezp_shoutbox AS s
LEFT JOIN {$db_prefix}members AS m ON (s.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(m.ID_GROUP = 0, m.ID_POST_GROUP, m.ID_GROUP))
ORDER BY s.id_shout DESC LIMIT $numberofShouts", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($dbresult))
{
// Censor the shout
censorText($row['shout']);
if ($ezpSettings['ezp_shoutbox_showdate'])
echo timeformat($row['date']) . ' ';
echo '<a href="',$scripturl,'?action=profile;u=',$row['id_member'],'" style="color: ' . $row['onlineColor'] . ';">',$row['realName'],'</a>';
if (empty($ezpSettings['ezp_shoutbox_hidesays']))
echo $txt['ezp_shoutbox_says'];
else
echo ": ";
echo parse_bbc($row['shout']);
if ($adminShoutBox && empty($ezpSettings['ezp_shoutbox_hidedelete']))
echo ' <a href="',$scripturl,'?action=ezportal;sa=removeshout;shout=',$row['id_shout'],'" style="color: #FF0000">[X]</a>';
echo '<br />';
}
mysql_free_result($dbresult);
}
if ($useIframe == true && $iframe == false)
{
echo '</iframe>';
}
if ($iframe == true)
{
echo '</div></body></html>';
return;
}
$_SESSION['shoutbox_url'] = $_SERVER['REQUEST_URI'];
if ($ezpSettings['ezp_shoutbox_archivehistory'] == 1)
echo '<span class="smalltext"><a href="',$scripturl,'?action=ezportal;sa=shouthistory">',$txt['ezp_txt_viewshouthistory'],'</a></span><br />';
// Show the shoutbox form
if (!$user_info['is_guest'])
{
echo '<hr />
<form action="', $scripturl, '?action=ezportal;sa=addshout" id="ezpshoutform" method="post" accept-charset="', $context['character_set'], '">';
if ($ezpSettings['ezp_shoutbox_showbbc'])
{
$context['bbc_tags2'] = array();
$context['bbc_tags2'][] = array(
'bold' => array('code' => 'b', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_bold']),
'italicize' => array('code' => 'i', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_italic']),
'underline' => array('code' => 'u', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_underline']),
'strike' => array('code' => 's', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_strike']),
array(),
'img' => array('code' => 'img', 'before' => '

', 'description' => $txt['ezp_bbc_img']),
'url' => array('code' => 'url', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_link']),
'move' => array('code' => 'move', 'before' => '
', 'description' => $txt['ezp_bbc_move']),
);
$context['bbc_tags2'][] = array(
'left' => array('code' => 'left', 'before' => '
', 'after' => '
', 'description' => $txt['ezp_bbc_left'] ),
'center' => array('code' => 'center', 'before' => '
', 'after' => '
', 'description' => $txt['ezp_bbc_center']),
'right' => array('code' => 'right', 'before' => '
', 'after' => '
', 'description' => $txt['ezp_bbc_right']),
array(),
'size' => array('code' => 'size', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_size']),
'face' => array('code' => 'font', 'before' => '
', 'after' => '', 'description' => $txt['ezp_bbc_face'] ),
array(),
'hr' => array('code' => 'hr', 'before' => '
', 'description' => $txt['ezp_bbc_hr'] ),
);
foreach ($context['bbc_tags2'] as $i => $row)
{
foreach ($row as $image => $tag)
{
// Is this tag disabled?
if (!empty($tag['code']) && !empty($context['disabled_tags'][$tag['code']]))
continue;
if (isset($tag['before']))
echo '<a href="javascript:' . (isset($tag['after']) ? 'surround' : 'replace') . 'Text(\'' . $tag['before'] . '\'' . (isset($tag['after']) ? ', \'' . $tag['after'] . '\'' : '') . ', document.forms.ezpshoutform.shout);"><img src="' . $settings['images_url'] . '/bbc/' . $image . '.gif" align="bottom" width="23" height="22" alt="' . $tag['description'] . '" border="0" /></a>';
}
if ($i != count($context['bbc_tags2']) - 1)
echo '<br />';
}
}
if ($ezpSettings['ezp_shoutbox_showsmilies'])
{
echo '<br />';
$context['shout_smileys'] = array(
'smileys' => array(
array('code' => '

', 'filename' => 'smiley.gif'),
array('code' => '

', 'filename' => 'wink.gif'),
array('code' => '

', 'filename' => 'cheesy.gif'),
array('code' => '

', 'filename' => 'grin.gif'),
array('code' => '

', 'filename' => 'angry.gif'),
array('code' => '

', 'filename' => 'sad.gif'),
array('code' => '

', 'filename' => 'shocked.gif'),
array('code' => '

', 'filename' => 'cool.gif'),
array('code' => '

', 'filename' => 'huh.gif'),
array('code' => '

', 'filename' => 'rolleyes.gif'),
array('code' => '

', 'filename' => 'tongue.gif'),
array('code' => '

', 'filename' => 'embarrassed.gif'),
array('code' => '

', 'filename' => 'lipsrsealed.gif'),
array('code' => '

\', 'filename' => 'undecided.gif'),
array('code' => '

', 'filename' => 'kiss.gif'),
array('code' => ':\'(', 'filename' => 'cry.gif')
),
);
$settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set'];
// Show each row of smileys

.
foreach ($context['shout_smileys'] as $smiley_row)
{
foreach (@$smiley_row as $smiley)
{
echo '
<a href="javascript:replaceText(\' ', addslashes($smiley['code']), '\', document.forms.ezpshoutform.shout);"><img src="', $settings['smileys_url'], '/', $smiley['filename'], '" align="bottom" alt="" title="" border="0" /></a>';
}
}
}
echo '
<textarea name="shout" id="shout" rows="3" cols="30" style="width: 98%"></textarea>
<br />
<input type="submit" value="', $txt['ezp_shoutbox_add_shout'], '" />
</form>';
}
echo '</div>
</td>
</tr>
</table>';
}
Please can you let me know where to place the </br>. I'm not ever sure if I must be using /br.