Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Ok user is logged in ..

I want to do three things....
- echo logged in users profile photo.
- echo logged in users username and href to their profile.
- echo messages received ( count ) and href to their messages.
Imagine, this to be on any or all pages.. so just wondering if anyone knows the code to do this.. Thanks
0
Answers
Am thinking we need to wrap this in an array.. But im no php guru lol
Ok I have username and url link ( i think I have done this correctly.
hmm not sure this is correct actually..
Ok I think the above is fixed.
Ok now we have alert issue. The above code renders perfectly until we receive a notification.
The output html looks like this...
Ok I may have fixed this issue.
Ok sheesh I am dumb, and slow but persistant..
Now to get notification alert for this part.. to link to messages all.
Plus still need to echo users profile pic
@422 if we leave this long enough will you figure it out all by yourself? For user photo (which also links to their profile) use...
UserPhoto($Name)
Lol its a work in progress , i blog it so others can see what i am doing and what a knob i am lol
Will try that thanks , do you know var for messages all with count like u see on inbox menu
Inbox (3)
hmm so how would you render that UserPhoto on the page anywhere you want with associative url back to their profile ? I cannot get it to render correctly
<a href="{link path="messages/inbox"}">Inbox {if $User.CountUnreadConversations} <span>{$User.CountUnreadConversations}</span>{/if}</a>
that is in smarty....
Well where you want it, you get the correct view for your theme and place
echo UserPhoto($Name);
should work< am a noob.
trying to echo currently logged in users photo. Say I wanted it in footer, or wherever.
Yeah I dont use smarty.
I ain't much better
for the
$Name
to be currently logged on user you would use$Session->UserID = $Name
(I just realised what a weird word session is) I think.For the messages
$Name->CountUnreadConversations = $UnreadConvo
not confident on that one, in the database there is only a countreadmessagesWell the name part I am sorted.. But can you echo currently logged in users avatar ? ( UserPhoto ) cos I sure as shit cant.
I always thought Flange was a great word
I used to have this in my helper_functions view for my theme, but I didn't like it and there is a plugin for it anyway. It displays the first and last users to post in that discussions photos.
... a little bit later ...
and that worked perfectly fine
Yeah thats cool, i got that. But i want to echo userphoto of logged in user. I must be the worlds biggest noob, cos this has me beat
?
The only place I have used the logged in users profile picture is in my minecraft theme, which uses smarty. minecraft-theme
this markdown shit is confusing me
Annoying isnt it
Also noted that user links, have their userid like this:
forum-theme/profile/2/username
How do we parse the userid ? ... argghh is there anywhere in the documentation that helps play with these vars