SimplePortal
Customization => Custom Coding => Topic started by: wiecher on August 31, 2011, 05:27:25 PM
-
How do I make the smilies and images automatically reduced in the shoutbox?
Thanks in advance
;D ;D ;D
-
To what size?
-
To 20x20 :D
-
Open ./Themes/default/PortalShoutbox.template.php
Find:
<li class="smalltext">', $shout['text'], '</li>
Replace with:
<li class="smalltext">', str_replace('<img', '<img width="20" height="20"', $shout['text')], '</li>
-
Don`t work i am sorry :'(
No shoutbox when i ad that code.
-
Oh, I made a mistake, sorry.
Replace it with this:
<li class="smalltext">', str_replace('<img', '<img width="20" height="20"', $shout['text']), '</li>
-
Same problem :'(
-
It works fine for me, what exactly are you doing?
-
Maybe can you check this please.
-
Find:
if (!empty($context['SPortal']['shouts_history']))
foreach ($context['SPortal']['shouts_history'] as $shout)
echo '
', !$shout['is_me'] ? '<li class="smalltext"><strong>' . $shout['author']['link'] . ':</strong></li>' : '', '
<li class="smalltext">', $shout['text'], '</li>
<li class="smalltext shoutbox_time">', $shout['delete_link'], $shout['time'], '</li>';
Replace with:
if (!empty($context['SPortal']['shouts_history']))
foreach ($context['SPortal']['shouts_history'] as $shout)
echo '
', !$shout['is_me'] ? '<li class="smalltext"><strong>' . $shout['author']['link'] . ':</strong></li>' : '', '
<li class="smalltext">', str_replace('<img', '<img width="20" height="20"', $shout['text']), '</li>
<li class="smalltext shoutbox_time">', $shout['delete_link'], $shout['time'], '</li>';
-
Sorry won`t work :'(
-
No idea, it works fine for me.
-
clear cache... maybe u see work
-
Where can i find it in SP 2.3.5 ???
-
Before making any changes remember to make backup!
In file: ./Themes/default/PortalShoutbox.template.php
echo '
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', $shout['text'], '<br />', !empty($shout['delete_link_js']) ? '<span class="shoutbox_delete">' . $shout['delete_link_js'] . '</span>' : '' , '<span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';
echo '
<li class="smalltext">', !$shout['is_me'] ? '<strong>' . $shout['author']['link'] . ':</strong> ' : '', str_replace('<img', '<img width="20" height="20"', $shout['text']), '<br />', !empty($shout['delete_link_js']) ? '<span class="shoutbox_delete">' . $shout['delete_link_js'] . '</span>' : '' , '<span class="smalltext shoutbox_time">', $shout['time'], '</span></li>';
-
I mean if I want a picture show in the shoutbox from an external url.
If I post them then they are very large.