collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 456
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Add avatar and disable smileys in shoutbox  (Read 17700 times)

0 Members and 1 Guest are viewing this topic.

Offline PokemonS

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Female
    • Pokemon Stars Indonesia
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Add avatar and disable smileys in shoutbox
« 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.

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Add avatar and disable smileys in shoutbox
« Reply #1 on: March 13, 2013, 02:42:17 PM »
I almost got it working, but when someone sends new shout it looks like this:


Can't figure it out.. :|

edit:

Try this edits (BUT BEFORE MAKE BACKUPS):
PortalShoutbox.template.php:
Code: (Find) [Select]
<li class="smalltext">', !$shout['is_me']
Code: (Replace with) [Select]
<li class="smalltext">'.$shout['author']['avatar'].' ', !$shout['is_me']

Code: (Find) [Select]
<id>', $shout['id'], '</id>
Code: (Replace with) [Select]
<id>', $shout['id'], '</id>
<avatar>' , $avatarSB , '</avatar>

Code: (Find) [Select]
foreach ($context['SPortal']['shouts'] as $shout)
echo '
Code: (Replace with) [Select]
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 '

Code: (Find) [Select]
</shout>';
Code: (Replace with) [Select]
</shout>';
}

Code: (Find) [Select]
global $context, $txt;
Code: (Replace with) [Select]
global $context, $txt, $memberContext, $settings;


portal.js:
Code: (Find) [Select]
var shoutbox_id
Code: (Replace with) [Select]
var avatar, shoutbox_id

Code: (Find) [Select]
id = shout.getElementsByTagName("id")[0].childNodes[0].nodeValue;
Code: (Replace with) [Select]
id = shout.getElementsByTagName("id")[0].childNodes[0].nodeValue;
avatar = shout.getElementsByTagName("avatar")[0].childNodes[0].nodeValue;

Code: (Find) [Select]
new_body += '<li class="smalltext">' +
Code: (Replace with) [Select]
new_body += '<li class="smalltext"><img src="' + avatar +'" width="20px" height="20px" />' +

Subs-Portal.php
Code: (Find) [Select]
'color' => $online_color,
Code: (Replace with) [Select]
'color' => $online_color,
'avatar' => '<img src="' . $avatarSB . '" width="20px" height="20px" />',

Code: (Find) [Select]
// Disable the aeva mod for the shoutbox.
Code: (Replace with) [Select]
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.

Code: (Find) [Select]
$shoutbox = !empty($shoutbox) ? (int) $shoutbox : 0;
Code: (Replace with) [Select]
global $memberContext, $settings;

$shoutbox = !empty($shoutbox) ? (int) $shoutbox : 0;

Users have to clear browser cache, and you have to clear  forum cache.
« Last Edit: March 13, 2013, 03:57:28 PM by phantomm »

weerforum

  • Guest
Re: Add avatar and disable smileys in shoutbox
« Reply #2 on: March 20, 2013, 08:46:24 AM »
Can you make a mod for it please ?

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Add avatar and disable smileys in shoutbox
« Reply #3 on: March 20, 2013, 09:34:05 AM »
package attached
« Last Edit: October 08, 2013, 11:30:13 AM by phantomm »

weerforum

  • Guest
Re: Add avatar and disable smileys in shoutbox
« Reply #4 on: March 20, 2013, 09:44:39 AM »
Yes thnx that works great.
And disable smileys in shoutbox ?

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #5 on: March 20, 2013, 05:33:10 PM »
package attached

This works great for me... until I type something in the shoutbox then ALL shoutbox avatars go away.

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Add avatar and disable smileys in shoutbox
« Reply #6 on: March 20, 2013, 05:35:50 PM »
Clear forum and browser cache

Users have to clear browser cache, and you have to clear  forum cache.
« Last Edit: March 20, 2013, 05:43:49 PM by phantomm »

Offline Devil jimmy

  • Jr. Member
  • **
  • Posts: 73
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #7 on: March 20, 2013, 06:03:41 PM »
thank you phantomm
avatars in shout
nice nice  >:-D

weerforum

  • Guest
Re: Add avatar and disable smileys in shoutbox
« Reply #8 on: March 25, 2013, 05:53:23 PM »
disable smileys in shoutbox ?
Don`t work

Offline PokemonS

  • Jr. Member
  • **
  • Posts: 60
  • Gender: Female
    • Pokemon Stars Indonesia
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Add avatar and disable smileys in shoutbox
« Reply #9 on: April 01, 2013, 12:50:47 PM »
Thanks for fast reply, it really works well!


Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #10 on: April 18, 2013, 10:49:58 AM »
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!

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Add avatar and disable smileys in shoutbox
« Reply #11 on: April 18, 2013, 12:40:50 PM »
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.

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #12 on: April 18, 2013, 04:02:08 PM »
My site is a private site... but I could set someone up with a login/password if necessary...

Here is the js file though...

Offline phantomm

  • Translator
  • *
  • Posts: 406
  • Gender: Male
  • Smile, tomorrow will be worse...
    • Polish ElkArte community
  • SMF Version: None
  • Elkarte Version: 1.0.5
Re: Add avatar and disable smileys in shoutbox
« Reply #13 on: April 18, 2013, 04:31:59 PM »
try this in portal.js:
Code: (Find) [Select]
height="20px" />'
Code: (Replace with) [Select]
height="20px" /> '
« Last Edit: April 28, 2013, 03:47:46 PM by phantomm »

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #14 on: April 18, 2013, 07:54:03 PM »
...that did it.

Thank you.


Offline TrickyRicky

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #15 on: November 29, 2013, 11:44:43 PM »
Fantastic works great.

Offline joeseppy

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Add avatar and disable smileys in shoutbox
« Reply #16 on: March 27, 2014, 04:45:14 PM »
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!

Offline Burke Knight

  • Sr. Member
  • ****
  • Posts: 394
  • Gender: Male
  • I tell it how I see it. Don't like it? Hit Alt+F4
    • BurkeKnight Enterprises
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
Re: Add avatar and disable smileys in shoutbox
« Reply #17 on: December 16, 2014, 09:45:47 AM »
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.