SimplePortal
Customization => Custom Coding => Topic started by: Kosedragen on October 03, 2008, 06:54:24 PM
-
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:
(http://i161.photobucket.com/albums/t226/Kosedragen/ulesteposter.png)
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.
-
Find this code ('SPortal.php'):
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> <img src="' . $settings['images_url'] . '/arrow.gif" alt="Arrow" /> <a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt['sp-userlogout'], '</a></div>';
Replace with this 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> <img src="' . $settings['images_url'] . '/arrow.gif" alt="Arrow" /> <a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt['sp-userlogout'], '</a></div>';
}
-
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?
-
No, you can change that code in the file that it running on your website. You don't need to reinstall SP.
-
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?
-
Attach SPortal.php
-
Will do.. If only I could. It tells me I'm not allowed to upload php-files even though I've seen people upload thousands of php-files.
EDIT: Pssh, did the simplest thing available right now; uploaded it as .txt
-
Stange I don't know why it is not allowed to upload php files...
Bye
DIN1031
-
Yeah, I found it strange too. But the .txt-file will do just fine, wont it?
EDIT: Just search for the phrase "vis nye poster" and you'll find the code LHVWB gave me :3
-
So this is a version with the dot in it ;)
(attached to this post)
Bye
DIN1031
-
No, it's the one without >< But I would LIKE the dot in that version. In order to make it look like it is listed with the other stats under user. Now it just looks like a random link thrown up in the block >:
-
No i attached the version with the dot in it xD
Bye
DIN1031
-
Oh I didn't notice xD Thanks mate!
EDIT: Ouch, close but no sigar >: I meant on the list under "new messages". Look at the attachment ^^; And you used the arrow instead of dot x3
-
Now i think it's okay :).
(attached the updated version) ;)
Bye
DIN1031
-
PERFECT! : D Problem solved, thank you very much.