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 ..
422
MVP
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
There was an error rendering this rich post.
0
Answers
Am thinking we need to wrap this in an array.. But im no php guru lol
There was an error rendering this rich post.
Ok I have username and url link ( i think I have done this correctly.
hmm not sure this is correct actually..
There was an error rendering this rich post.
Ok I think the above is fixed.
There was an error rendering this rich post.
Ok now we have alert issue. The above code renders perfectly until we receive a notification.
The output html looks like this...
There was an error rendering this rich post.
Ok I may have fixed this issue.
There was an error rendering this rich post.
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
There was an error rendering this rich post.
@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)
There was an error rendering this rich post.
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
There was an error rendering this rich post.
<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.
There was an error rendering this rich post.
Yeah I dont use smarty.
There was an error rendering this rich post.
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
There was an error rendering this rich post.
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
There was an error rendering this rich post.
?
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
There was an error rendering this rich post.
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
There was an error rendering this rich post.