SimplePortal

Customization => Custom Coding => Topic started by: PokemonS on May 27, 2015, 11:56:47 PM

Title: Highlight new shout
Post by: PokemonS on May 27, 2015, 11:56:47 PM
SP 2.3.6
SMF 2.0.10

Hi,

Look at this screenshot:

(http://puu.sh/i3eKK.png)

That's just an example edited on Photoshop.
Look at the yellow highlight, it's the newest shout.

Is it possible? And how? Possibly edit in portal.js but dunno to code.
Title: Re: Highlight new shout
Post by: ♦ Ninja ZX-10RR ♦ on May 28, 2015, 08:09:27 AM
There's no screenshot :P
Anyways what you are asking looks clear to me, but extremely difficult. Maybe you can do some magic voodoo with the js (I call it that way because I am totally unable to code js!), but to me it would be something like linking the shoutbox to the profile, tell the db which messages had been readed and which ones weren't, then run the query to verify if there are new ones and highlight them. It would kill the server immediately.
However, since I don't know js, I might be wrong.
Title: Re: Highlight new shout
Post by: Chen Zhen on May 29, 2015, 10:54:56 PM

PokemonS,

  What are the specifics of what you are requesting?
Is it just the single most recent shout that you would like highlighted?
Perhaps all shouts not read for the current session (using cookies to a max of X)?

Regards.
Title: Re: Highlight new shout
Post by: PokemonS on May 30, 2015, 01:03:15 AM

PokemonS,

  What are the specifics of what you are requesting?
Is it just the single most recent shout that you would like highlighted?
Perhaps all shouts not read for the current session (using cookies to a max of X)?

Regards.

Specific:

1. At first landing to the page, there is no highlight in shoutbox.
2. Shoutbox refresh itself (autorefresh=10s), and if there is a new shout, latest shout(s)'s highlight is on.
3. At next shoutbox refresh, and if there are no shout, latest shout(s)'s highlight is off.

Title: Re: Highlight new shout
Post by: ♦ Ninja ZX-10RR ♦ on May 30, 2015, 09:28:46 AM
Perhaps all shouts not read for the current session (using cookies to a max of X)?
Not entirely accurate but that wouldn't kill the server, good idea!
Title: Re: Highlight new shout
Post by: PokemonS on May 30, 2015, 03:24:13 PM
Perhaps all shouts not read for the current session (using cookies to a max of X)?
Not entirely accurate but that wouldn't kill the server, good idea!

Oh, that's what I mean, lol.
It just like PM, it's still unread message until I open the message.

Forget my previous post if that's complicated.
Title: Re: Highlight new shout
Post by: ♦ Ninja ZX-10RR ♦ on May 30, 2015, 04:14:47 PM
I meant not entirely accurate because I think that Chen Zhen wants to place them into the cookie, so they are inaccurate if you change browser/pc/device, but they are accurate most of the times if you use the same browser and device :) It's a good approximation, all in all; as for how he wants to do so, I don't really know, I am a supporter and a graphic, not a skilled coder as he is.
Title: Re: Highlight new shout
Post by: PokemonS on May 30, 2015, 04:42:32 PM
I meant not entirely accurate because I think that Chen Zhen wants to place them into the cookie, so they are inaccurate if you change browser/pc/device, but they are accurate most of the times if you use the same browser and device :) It's a good approximation, all in all; as for how he wants to do so, I don't really know, I am a supporter and a graphic, not a skilled coder as he is.

That's still okay, lots of users here using same browser/device and almost never logout.
SimplePortal 2.3.8 © 2008-2024, SimplePortal