SimplePortal

Development => Feature Requests => Applied Requests => Topic started by: sornok on September 18, 2008, 03:41:13 AM

Title: posts since last visit
Post by: sornok on September 18, 2008, 03:41:13 AM
Hello again,

"View new posts since last visit" was a feature of various portals that was really useful. According to my knowledge, there is nothing like that in simpleportal. Is it possible to have such a link somehow ?

Thanks in advance.
Title: Re: posts since last visit
Post by: Nathaniel on September 18, 2008, 04:01:30 AM
Do you just want to add it to its own block?

That should be easy to do with a 'PHP' block, create a new one in the admin section and then add this code to it:
Code: [Select]
global $scripturl;
echo '<a href="', $scripturl, '?action=unread">View new posts since last visit</a>';
Title: Re: posts since last visit
Post by: sornok on September 18, 2008, 04:17:03 AM
Oh that's great. Could it also be possible to add it in the "User Info" Block ?
Title: Re: posts since last visit
Post by: [SiNaN] on September 18, 2008, 04:30:50 AM
Hmmm, we can have a count of it leading to the unread page maybe.
Title: Re: posts since last visit
Post by: sornok on September 18, 2008, 08:23:55 AM
I guess u re talking about something like :

Quote
View new posts since last visit (18)
showing the number !

I guess also something like
Quote
There are no new posts since your last visit
could also be possible, and would make the whole thing more dynamic.


p.s. Any chance I can get some help on how to integrate the original code to "User Info" block ?
Title: Re: posts since last visit
Post by: Cyst on September 18, 2008, 03:38:56 PM
Do you just want to add it to its own block?

That should be easy to do with a 'PHP' block, create a new one in the admin section and then add this code to it:
Code: [Select]
global $scripturl;
echo '<a href="', $scripturl, '?action=unread">View new posts since last visit</a>';

Thanks for the code, nice to have it as a little extra. It would be great to have the number of posts too, like someone else said.
Title: Re: posts since last visit
Post by: Cyst on September 19, 2008, 07:15:44 AM

p.s. Any chance I can get some help on how to integrate the original code to "User Info" block ?

Thinking about it, this would be pretty cool.

Maybe something like a 'Unread Posts' link directly under 'Profile' and 'Logout'
Title: Re: posts since last visit
Post by: [SiNaN] on April 03, 2009, 03:16:36 AM
This is now in 2.2!
SimplePortal 2.3.8 © 2008-2024, SimplePortal