I searched for tp userbox code and found this
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
<span class="smalltext">', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '[/url]', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</span> 8)
now which of this is the code which shows ---- show own posts
I want to put this code in a phpbox. ^-^
I have other codes (like unread and new topics) I only want show own post code. :coolsmiley:
That is the code for showing the PM text.
:2funny:
I got the code now
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['member']['id'], ';sa=showPosts">' .$txt['tp-posts'].'</a>';
}
got it from here
http://www.tinyportal.net/index.php?topic=1157.msg9169#msg9169
Good job!
Is this topic now solved falguni1? If it is, can you mark it solved in the first post?
I wan't to try and encourage you guys to start marking topics as Solved.
Thanks
not solved yet dear
I am using a block snippet called menu :laugh:
the code is
<img alt="forum" title="forum" src="/forum.gif" border="0"
height="15" width="15" />
<a title="Forum" href="http://omsites.com/omsaigan">Forum</a>
<br />
<img alt="forum" title="forum" src="forum.gif" border="0"
height="15" width="15" />
<a title="Forum" href="http://omsites.com/omsaigan/index.php?action=unreadreplies">new replies to my
post</a>
<br />
<img alt="forum" title="forum" src="forum.gif" border="0"
height="15" width="15" />
<a title="Forum" href="http://omsites.com/omsaigan/index.php?action=unread">new latest topics</a>
<br />
<img alt="forum" title="forum" src="forum.gif" border="0"
height="15" width="15" />
<a title="Forum" href="http://omsites.com/omsaigan/index.php?action=recent">new recent posts</a>
and I dont know how to put the own post code in it :-\
I don't do much with in-line PHP, but you could try adding:
<br />
<img alt="forum" title="forum" src="forum.gif" border="0"
height="15" width="15" />
<? php
global $context, $scripturl, $txt;
echo '
<a title="Forum" href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">' .$txt['tp-posts'].'</a>';
?>
Ahh the above one is kinda wrong.
It is not 'member' it is 'user'
So
<br />
<img alt="forum" title="forum" src="forum.gif" border="0"
height="15" width="15" />
<? php
global $context, $scripturl, $txt;
echo '
<a title="Forum" href="', $scripturl, '?action=profile;u=', $context['user']['id'], ';sa=showPosts">' .$txt['tp-posts'].'</a>';
?>
this is the code I want 8)
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
now I want some one to tell me how to put show own post code in it. :smiley6600:
global $context, $scripturl, $txt;
if($context['user']['is_logged'])
echo '
<a title="Forum" href="', $scripturl, '?action=profile;u=', $context['user']['id'], ';sa=showPosts">' .$txt['tp-posts'].'</a>';
I used it in a phpbox and it has no errors at all
it shows nothing at all there is no text nothing all is empty under the phpbox header.
http://omsites.com/copy2/index.php
there is nothing under aa1.
Don't forget to check the error logs when using custom code snippets as it can usually tell you the error. My guess is that txt['tp-posts'] is not defined. Replace this code ', $txt['tp-posts'],' with your own text. "Show Posts" or what ever you want the link to say.
I think using tp related code is not the correct thing the code is like this
go to your profile page and see there down
and
see
Show the last posts of this person.
Show general statistics for this member.
from here we can get the code for show own posts.
The code posted by Dragooon is the code for show own posts Falguni1.