SimplePortal
Customization => Custom Coding => Topic started by: Ron-KK4HGY on July 09, 2015, 09:37:06 PM
-
Can the shout box text line be changed to allow for entry of several lines of text instead of the one scrolled line of text, or is there another shout box available that would be able to do this?
-
To achieve this, you'll have to replace the <input type="text"> that we use for the shout content with a <textarea></textarea> tag. It'll probably require plenty of edits to shoutbox related code. Unfortunately, I'll not be able to provide those at this time. I'll be moving this to Custom Coding board.
-
Okay, thanks for the quick reply.
-
I checked it to see how difficult it would be to do what you want and it seems to be working with something along these lines:
Themes/default/PortalShoutbox.template.php
<div class="shoutbox_input smalltext">
<input type="text" name="new_shout" id="new_shout_', $shoutbox['id'], '" class="shoutbox_input sp_float_left input_text"', $context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' . $shoutbox['id'] . ', \'' . $context['session_var'] . '\', \'' . $context['session_id'] . '\'); return false; }"' : '', ' />
<input type="submit" name="submit_shout" value="', $txt['sp_shoutbox_button'], '" class="sp_float_right button_submit" onclick="sp_submit_shout(', $shoutbox['id'], ', \'', $context['session_var'], '\', \'', $context['session_id'], '\'); return false;" />
</div>';
<div class="shoutbox_input smalltext">
<input type="submit" name="submit_shout" value="', $txt['sp_shoutbox_button'], '" class="button_submit" onclick="sp_submit_shout(', $shoutbox['id'], ', \'', $context['session_var'], '\', \'', $context['session_id'], '\'); return false;" style="float: right; width: 50px; height: 4.5em; outline: none;" />
<div style="margin-right: 60px;"><textarea name="new_shout" id="new_shout_', $shoutbox['id'], '" rows="3" style="width: 100%;"></textarea></div>
</div>';
It may need some fine tuning to make everything look perfectly sized and aligned, so good luck with that!