Customization > Custom Coding

"Show unread since last visit" in User block?

(1/3) > >>

Kosedragen:
Hello. I'm kind of new to SimplePortal, and I have used it for just this one day. However, I was wondering wether it was possible to put "show unread posts since last visit" under the user block. Like on the picture here:


Bruker = User.
Vis uleste poster = show unread posts.

... Or maybe the same, but with unread topics instead?

It's Norwegian :3

Thanks for any response :D

Realized this post fits better here.

Nathaniel:
Find this code ('SPortal.php'):

--- Code: --- if (!$context['user']['is_guest'])
echo '<div align="center"><img src="' . $settings['images_url'] . '/arrow.gif" alt="Arrow" /> <a href="'.$scripturl.'?action=profile">', $txt['sp-userprofile'], '</a>&nbsp;&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/arrow.gif" alt="Arrow" /> <a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt['sp-userlogout'], '</a></div>';
--- End code ---

Replace with this code:

--- Code: --- if (!$context['user']['is_guest'])
{
echo '<a href="', $scripurl, '?action=unread">Vis uleste poster</a><br />
<div align="center"><img src="' . $settings['images_url'] . '/arrow.gif" alt="Arrow" /> <a href="'.$scripturl.'?action=profile">', $txt['sp-userprofile'], '</a>&nbsp;&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/arrow.gif" alt="Arrow" /> <a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt['sp-userlogout'], '</a></div>';
}
--- End code ---

Kosedragen:
Thank you :D But doesn't that mean I'll have to reinstall SP? Does it remember my settings or would I have to save them somewhere?

Nathaniel:
No, you can change that code in the file that it running on your website. You don't need to reinstall SP.

Kosedragen:
Really? I know I can view the file, but I have never seen somewhere I could edit it..? (I'm still kind of newbish xp)

EDIT: Right, I just found the options making me able to turn the files writeable, but I have no idea what to write in the message that pops up when I try to save the settings.

EDIT2: Nevermind this. The code worked perfectly, my host told me how to do it : D Thank you so much!
But I'd like to make it have those dots too, like it was on the same list with "New messages" and those. Is that hard to do?

EDIT3: I found out it was too hard for me atleast ^^ Can I bother you with this trifle?

Navigation

[0] Message Index

[#] Next page

Go to full version