SimplePortal
Support => English Support => Topic started by: PokemonS on March 13, 2013, 12:14:12 PM
-
SimplePortal 2.3.5
Hi,
Last time I asked those two questions in SMF.
So, how to add avatar and disable smileys in shoutbox?
Thx.
-
I almost got it working, but when someone sends new shout it looks like this:
(http://img705.imageshack.us/img705/281/myboard.png)
Can't figure it out.. :|
edit:
Try this edits (BUT BEFORE MAKE BACKUPS):
PortalShoutbox.template.php:
<li class="smalltext">', !$shout['is_me']
<li class="smalltext">'.$shout['author']['avatar'].' ', !$shout['is_me']
<id>', $shout['id'], '</id>
<id>', $shout['id'], '</id>
<avatar>' , $avatarSB , '</avatar>
foreach ($context['SPortal']['shouts'] as $shout)
echo '
foreach ($context['SPortal']['shouts'] as $shout)
{
loadMemberData($shout['author']['id']);
loadMemberContext($shout['author']['id']);
if (empty($memberContext[$shout['author']['id']]['avatar']['href']))
$avatarSB = $settings['default_images_url'].'/sp/user.png';
else
$avatarSB = $memberContext[$shout['author']['id']]['avatar']['href'];
echo '
</shout>';
</shout>';
}
global $context, $txt;
global $context, $txt, $memberContext, $settings;
portal.js:
var shoutbox_id
var avatar, shoutbox_id
id = shout.getElementsByTagName("id")[0].childNodes[0].nodeValue;
id = shout.getElementsByTagName("id")[0].childNodes[0].nodeValue;
avatar = shout.getElementsByTagName("avatar")[0].childNodes[0].nodeValue;
new_body += '<li class="smalltext">' +
new_body += '<li class="smalltext"><img src="' + avatar +'" width="20px" height="20px" />' +
Subs-Portal.php
'color' => $online_color,
'color' => $online_color,
'avatar' => '<img src="' . $avatarSB . '" width="20px" height="20px" />',
// Disable the aeva mod for the shoutbox.
loadMemberData($row['id_member']);
loadMemberContext($row['id_member']);
if (empty($memberContext[$row['id_member']]['avatar']['href']))
$avatarSB = $settings['default_images_url'].'/sp/user.png';
else
$avatarSB = $memberContext[$row['id_member']]['avatar']['href'];
// Disable the aeva mod for the shoutbox.
$shoutbox = !empty($shoutbox) ? (int) $shoutbox : 0;
global $memberContext, $settings;
$shoutbox = !empty($shoutbox) ? (int) $shoutbox : 0;
Users have to clear browser cache, and you have to clear forum cache.
-
Can you make a mod for it please ?
-
package attached
-
Yes thnx that works great.
And disable smileys in shoutbox ?
-
package attached
This works great for me... until I type something in the shoutbox then ALL shoutbox avatars go away.
-
Clear forum and browser cache
Users have to clear browser cache, and you have to clear forum cache.
-
thank you phantomm
avatars in shout
nice nice >:-D
-
disable smileys in shoutbox ?
Don`t work
-
Thanks for fast reply, it really works well!
(http://puu.sh/2rV41)
-
The AVATAR mod is working great aside from one issue I am having.
Upon loading of the screen, the avatars look great....proper spacing between them and the name of the user. Once you add to the shoutbox however, I lose the space between the avatar and the name of the person next to it.
I am assuming I have some CSS borked somewhere? Where should I look?
Thanks!
Works great otherwise!
-
I think that there is some typo in portal.js. When shouts are loaded (after refresh) HTML is generated by JavaScript, if you could attach portal.js or give url to your site I can check it.
-
My site is a private site... but I could set someone up with a login/password if necessary...
Here is the js file though...
-
try this in portal.js:
height="20px" />'
height="20px" /> '
-
...that did it.
Thank you.
-
Fantastic works great.
-
Hi guys. Thanks so much for this mod. just wondering - it seems to be slowing the chat down slightly - is there any way i can get around that? No worries if not. Thanks!
-
Seems that in 2.3.6 whenever add to posts in shoutbox, the avatars go missing. And when try to get info on the image, get this:
http://www.yourdomain.com/sp/user.png
Somehow, it's calling an image from an non-existent directory, instead of the avatar.