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: 389
  • 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: Shoutbox reverse order  (Read 8670 times)

0 Members and 1 Guest are viewing this topic.

Offline MazdaClubTR

  • Semi Newbie
  • *
  • Posts: 18
  • Gender: Male
    • MazdaClubTR Test Site
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Shoutbox reverse order
« on: November 11, 2009, 05:35:02 AM »
I was trying the shoutbox option and wanted to try th shoutbox to be used as a chat . So I put it in the reverse order and realised that when reverse order is set the users viewer see the first  few messages in the box rather than the last post. You are forced to scroll down.

Is it possible to make it go to last post ?

P.S. Although I have set the versions of SMF and SP in my profile forum warns me to change it..


Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Shoutbox reverse order
« Reply #1 on: November 11, 2009, 07:02:35 PM »
Code: ("Find (/Themes/default/PortalShoutbox.template.php)") [Select]
<script language="Javascript" type="text/javascript"><!-- // --><![CDATA[';
Code: ("Replace") [Select]
<script language="Javascript" type="text/javascript"><!-- // --><![CDATA[';

if ($shoutbox['reverse'])
echo '
var objDiv = document.getElementById("shouts_', $shoutbox['id'], '");
objDiv.scrollTop = objDiv.scrollHeight;';
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline MazdaClubTR

  • Semi Newbie
  • *
  • Posts: 18
  • Gender: Male
    • MazdaClubTR Test Site
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #2 on: November 14, 2009, 11:49:04 AM »
When I do that I get a theme parse error..

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Shoutbox reverse order
« Reply #3 on: November 14, 2009, 05:25:42 PM »
Can you attach your '/Themes/default/PortalShoutbox.template.php' file?
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Ardd0

  • Semi Newbie
  • *
  • Posts: 21
    • Hypercrites.Org
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #4 on: November 20, 2009, 08:17:01 PM »
I tried that code and no parse error, however the scroll bar now starts in the middle, not starting at the bottom yet but on the upside it's halfway there :)
If the question is multiple choice my default is "All of the above."<a href="http://www.hypercrites.org"><img border="0" src="http://www.hypercrites.org/externals/rabbtag1c.gif" width="200" height="34"></a>

Offline Ardd0

  • Semi Newbie
  • *
  • Posts: 21
    • Hypercrites.Org
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #5 on: November 28, 2009, 05:16:29 PM »
Can you attach your '/Themes/default/PortalShoutbox.template.php' file?
Here's a copy of my PortalShoutbox.template.php if this will help.

 I'm using SMF forum 2.0 RC2 and SP 2.3.1 (for some reason this does not want to show up on my profile)

Any help with this would be very greatly appreciated.  :nervous-happy:
If the question is multiple choice my default is "All of the above."<a href="http://www.hypercrites.org"><img border="0" src="http://www.hypercrites.org/externals/rabbtag1c.gif" width="200" height="34"></a>

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Shoutbox reverse order
« Reply #6 on: December 10, 2009, 04:39:02 AM »
@Ardd0
Try the attached file.

@MazdaClubTR,
Could you please attach your file?
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline MazdaClubTR

  • Semi Newbie
  • *
  • Posts: 18
  • Gender: Male
    • MazdaClubTR Test Site
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #7 on: December 10, 2009, 07:53:00 AM »
Hi Nathaniel

Sorry for late response but due to some other problem (not anything related to SP ) I had to uninstall SP from test site.

I will try it again as soon as I reinstall.

Offline MazdaClubTR

  • Semi Newbie
  • *
  • Posts: 18
  • Gender: Male
    • MazdaClubTR Test Site
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #8 on: December 10, 2009, 09:05:04 AM »
Hi Nathaniel,

I reinstalled SP and tried it. This time it works but the newest shout doesnt shift the old ones up even auto refresh is set. You have to refresh the whole page.


Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Shoutbox reverse order
« Reply #9 on: December 10, 2009, 06:53:31 PM »
I forgot that another few edits are required for that:

Code: ("Find (Themes/default/portal.js or Themes/default/scripts/portal.js)") [Select]
var shoutbox_id, updated, error, warning, shout, id, author, time, timeclean, delete_link, body, is_me, new_body = '';
Code: ("Replace") [Select]
var shoutbox_id, updated, error, warning, reverse, shout, id, author, time, timeclean, delete_link, body, is_me, new_body = '';
Code: ("Find (Themes/default/portal.js or Themes/default/scripts/portal.js)") [Select]
      warning = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("warning")[0].childNodes[0].nodeValue;
Code: ("Replace") [Select]
      warning = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("warning")[0].childNodes[0].nodeValue;
      reverse = XMLDoc.getElementsByTagName("smf")[0].getElementsByTagName("reverse")[0].childNodes[0].nodeValue;

Code: ("Find (Themes/default/portal.js or Themes/default/scripts/portal.js)") [Select]
         setInnerHTML(document.getElementById('shouts_' + shoutbox_id), new_body);
Code: ("Replace") [Select]
         setInnerHTML(document.getElementById('shouts_' + shoutbox_id), new_body);

         if (reverse != 0)
            document.getElementById('shouts_' + shoutbox_id).scrollTop = document.getElementById('shouts_' + shoutbox_id).scrollHeight;
         else
            document.getElementById('shouts_' + shoutbox_id).scrollTop = 0;

Code: ("Find (Themes/default/PortalShoutbox.template..php)") [Select]
<warning>', !empty($context['SPortal']['shoutbox']['warning']) ? htmlspecialchars($context['SPortal']['shoutbox']['warning']) : 0, '</warning>';
Code: ("Replace") [Select]
   <warning>', !empty($context['SPortal']['shoutbox']['warning']) ? htmlspecialchars($context['SPortal']['shoutbox']['warning']) : 0, '</warning>
   <reverse>', !empty($context['SPortal']['shoutbox']['reverse']) ? 1 : 0, '</reverse>';
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline MazdaClubTR

  • Semi Newbie
  • *
  • Posts: 18
  • Gender: Male
    • MazdaClubTR Test Site
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #10 on: December 11, 2009, 03:15:20 AM »
Thanks, I will try that as soon as possible..

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Shoutbox reverse order
« Reply #11 on: December 18, 2009, 09:09:43 PM »
Thanks, I will try that as soon as possible..

Any updates on this issue? Did you manage to apply the edits and get this to work properly?
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Ardd0

  • Semi Newbie
  • *
  • Posts: 21
    • Hypercrites.Org
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #12 on: December 23, 2009, 06:10:18 PM »
@Ardd0
Try the attached file.

@MazdaClubTR,
Could you please attach your file?
Sorry for the late reply I just got back to that. THANKS for the help with this :) I'll try the attached file and the other edits as well.

 The oddest thing is that the original edit worked for the shoutbox in the admin section but no other...go figure.
If the question is multiple choice my default is "All of the above."<a href="http://www.hypercrites.org"><img border="0" src="http://www.hypercrites.org/externals/rabbtag1c.gif" width="200" height="34"></a>

Offline Ardd0

  • Semi Newbie
  • *
  • Posts: 21
    • Hypercrites.Org
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #13 on: December 23, 2009, 07:54:23 PM »
Thanks, I will try that as soon as possible..

Any updates on this issue? Did you manage to apply the edits and get this to work properly?
I tried all the edits and there is improvement the scroll bar goes to and stays at the bottom when you send a shout but still starts roughly in the center when the page is loaded, I used the attachment you sent as well as the portal.js edits

 here's the URL of my site http://www.hypercrites.org

 you are welcome to any kind of acess that would help just let me know and I'll set you up :)
« Last Edit: December 23, 2009, 08:25:47 PM by Ardd0 »
If the question is multiple choice my default is "All of the above."<a href="http://www.hypercrites.org"><img border="0" src="http://www.hypercrites.org/externals/rabbtag1c.gif" width="200" height="34"></a>

Offline MazdaClubTR

  • Semi Newbie
  • *
  • Posts: 18
  • Gender: Male
    • MazdaClubTR Test Site
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #14 on: January 06, 2010, 02:09:36 AM »
Any updates on this issue? Did you manage to apply the edits and get this to work properly?

Sorry for the late reply Nathaniel but I had to stop testing SP cause of the following problem. With the same banners I dont have the issue at all on my production site.

http://simpleportal.net/index.php?topic=4070.0

Offline Ardd0

  • Semi Newbie
  • *
  • Posts: 21
    • Hypercrites.Org
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #15 on: January 09, 2010, 01:02:39 AM »
This workaround graciously provided by a friend seems to have solve the problem of the scroll bar starting in the center when a page is loaded, it now snaps to the bottom and shows the newest post. I used this in conjunction with the edits you have provided and it seems a viable workaround.

 In the PortalShoutbox.template.php

 this
Code: [Select]
  if ($shoutbox['reverse'])
      echo '
      var objDiv = document.getElementById("shouts_', $shoutbox['id'], '");
      objDiv.scrollTop = objDiv.scrollHeight;';
 

 was changed to this
 
Code: [Select]
if ($shoutbox['reverse'])
      echo 'sp_refresh_shout('.$shoutbox['id'].');';

 I have tested this with both Firefox and IE and it seems to work well in both.
If the question is multiple choice my default is "All of the above."<a href="http://www.hypercrites.org"><img border="0" src="http://www.hypercrites.org/externals/rabbtag1c.gif" width="200" height="34"></a>

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox reverse order
« Reply #16 on: January 20, 2010, 02:19:50 PM »
I, unfortunately, don't have time to go over all the posts; so do we have anyone here having problems or is this issue solved?
And slowly, you come to realize... It's all as it should be...

Offline Clara Listensprechen

  • Just Registered
  • Posts: 1
  • SMF Version: 1.1.10
  • SP Version: None
Re: Shoutbox reverse order
« Reply #17 on: January 20, 2010, 11:20:59 PM »
I'm not sure if this fix produced the secondary problem: snapping to only the first two lines of the last shout instead of the end of the last shout; that's a problem that ensued after one of the fixes that was tried.  I'll have to yank Ardd's chain on that first, I think.

Offline Ardd0

  • Semi Newbie
  • *
  • Posts: 21
    • Hypercrites.Org
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Shoutbox reverse order
« Reply #18 on: January 21, 2010, 02:38:57 PM »
I, unfortunately, don't have time to go over all the posts; so do we have anyone here having problems or is this issue solved?

 You can mark this one resolved as far as I am concerned I posted the fix for this and the addition of an audible alert as a package here http://simpleportal.net/index.php?topic=4350.0

 Thanks for looking in on this you bring a really good vibe here :)
If the question is multiple choice my default is "All of the above."<a href="http://www.hypercrites.org"><img border="0" src="http://www.hypercrites.org/externals/rabbtag1c.gif" width="200" height="34"></a>

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox reverse order
« Reply #19 on: January 21, 2010, 03:23:41 PM »
I guess I'll keep this open until MazdaClubTR verifies the issue is fixed.
And slowly, you come to realize... It's all as it should be...