TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 1,031
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 311
  • Total: 311

How to edit User Block?

Started by keith021773, September 14, 2007, 02:40:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

keith021773

Hello everyone..    Quick question coming at you..   I hope this is the right board, if not, please move it for me..   Thanks!

I would like to have 2 sets of "Show Unread Posts" in my user block.  One for all of the unread posts except for one board and the other Unread posts for one board.   I have found out how to do that but I don't know how to edit the user block for tinyportal to do it..

What file would that block be in for me to edit?   Hopefully, if you tell me the file I can figure out the rest..   Hopefully....    LOL

Max


The file is located in your default directory...

Default/TPortalBlocks.temp search for "// Tportal userbox"  a few lines down is the code your looking for ;)

if(isset($context['TPortal']['userbox']['unread'])){
echo '<br />'.$bullet.'<a href="', $scripturl, '?action=unread">' .$txt['tp-unread'].'</a>
<br />'.$bullet.'<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
<br />'.$bullet.'<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>';
}



keith021773

Thanks all...     With the code that you gave me above.    How can I change it to this...

For:

Show unread posts     (http://www.daddyplace.com/index.php?action=unread;c=1,8,2,6)

Show unread Gaming Posts    (http://www.daddyplace.com/index.php?action=unread;c=3)

I'm using catagories instead of boards..

And everything else in the User block staying the same.

First off..  Will this work?    I am hopeing that it will, it will make things SO much easier on my members who aren't gamers..

IchBin

Take a look at the code Keith. You can add your necessary text to the end of the links.

keith021773

#4
Ok..  I got the code in and it works..   But I would like to change the wording of it from Show unread posts to Show unread gaming posts.     I don't see where to put that in?

Here is the code I have..


if(isset($context['TPortal']['userbox']['unread'])){
echo '<br />'.$bullet.'<a href="', $scripturl, '?action=unread;c=1,8,2,6">' .$txt['tp-unread'].'</a>
                                <br />'.$bullet.'<a href="', $scripturl, '?action=unread;c=3">' .$txt['tp-unread'].'</a>
<br />'.$bullet.'<a href="', $scripturl, '?action=unreadreplies">'.$txt['tp-replies'].'</a>
<br />'.$bullet.'<a href="', $scripturl, '?action=profile;u='.$context['user']['id'].';sa=showPosts">'.$txt['tp-showownposts'].'</a>';



For the first one I would like it to say.       Show New Posts
For the second one I would like it to say    Show New Gaming Posts

And the rest is fine..    Thanks again all!!!

IchBin

I'm not sure which file, but its in one of the TP language files. Check the Themes/default/TPortalindex.english.php file for the txt strings. Once you find the lines you can just change what they mean.

$txt['tp-unread']

keith021773

Your right IchBin and Thank you very much again, my friend!

In addition to the $txt['tp-unread'] I also made one called $txt['tp-unreadgaming'] for the New Gaming Posts I was talking about..

Thanks again all..   Problem solved and moving on to the next one that pops up.    LOL

You guys rock!

This website is proudly hosted on Crocweb Cloud Website Hosting.