Add welcome message with {Username} in the Login Widget
5 posters
Page 1 of 1
Add welcome message with {Username} in the Login Widget
Hello, I was wondering if I could code into my forum that once logged in, the 'login' box (displays the user's username, avatar, and "My Profile" button) would have a greeting message for the user in the table header, such as instead of saying the username, it saying "Welcome Back, {Username}"
MadroX- Forumember
- Posts : 39
Reputation : 0
Language : English
Re: Add welcome message with {Username} in the Login Widget
Hello,
Something like this?
You just need to style this by CSS to give your own "touch" to it...
Best regards, Wagner
Something like this?
- Code:
<script>
jQuery(function(){
var avatar = _userdata["avatar"];
jQuery('#avatar').append(avatar);
});
</script>
<div id="greeting">
<div id="avatar"></div>
Welcome back, <span class="USERLINK">{USERLINK}</span>
</div>
You just need to style this by CSS to give your own "touch" to it...
Best regards, Wagner
Re: Add welcome message with {Username} in the Login Widget
Unfortunately it did not work, in my css it said that most of it was made in html format and my css deleted most of the code by default, any other ideas?
MadroX- Forumember
- Posts : 39
Reputation : 0
Language : English
Re: Add welcome message with {Username} in the Login Widget
But, this is not a CSS code... You need to put this in the message of homepage...
Re: Add welcome message with {Username} in the Login Widget
administrator panel > display > homepage, generalities > homepage messageMadroX wrote:Unfortunately it did not work, in my css it said that most of it was made in html format and my css deleted most of the code by default, any other ideas?
and once you're there you can make your title and just add
- Code:
<script>
jQuery(function(){
var avatar = _userdata["avatar"];
jQuery('#avatar').append(avatar);
});
</script>
<div id="greeting">
<div id="avatar"></div>
Welcome back, <span class="USERLINK">{USERLINK}</span>
</div>
*Flora*- Forumember
- Posts : 27
Reputation : 2
Language : English
Re: Add welcome message with {Username} in the Login Widget
*Flora* wrote:
administrator panel > display > homepage, generalities > homepage message
and once you're there you can make your title and just addinto the message content, but be sure to press save on the bottom save button, and if you change any options on general Hope I helped!
- Code:
<script>
jQuery(function(){
var avatar = _userdata["avatar"];
jQuery('#avatar').append(avatar);
});
</script>
<div id="greeting">
<div id="avatar"></div>
Welcome back, <span class="USERLINK">{USERLINK}</span>
</div>
I Like this, but...
1. How to resize avatar?
2. How to put on right side (or center)?
Thanks in advance!
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Add welcome message with {Username} in the Login Widget
smejker wrote:
I Like this, but...
1. How to resize avatar?
2. How to put on right side (or center)?
Thanks in advance!
Anybody know?
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Add welcome message with {Username} in the Login Widget
You just need to use CSS...
1. To resize use these properties of CSS
2. On the right
On the center
Best regargs, waghcwb
1. To resize use these properties of CSS
- Code:
#avatar img{
width: WIDTHSIZE;
heigth: HEIGTHSIZE;
}
2. On the right
- Code:
#avatar img{
float: right;
}
On the center
- Code:
#avatar{
text-align: center;
}
Best regargs, waghcwb
Re: Add welcome message with {Username} in the Login Widget
Thanks Wagner'
Yes, it's work... but, I have another little problem...
Avatar picture is OK...The message of "USERLINK" is still on the left...
Solution...
Regards & Respect!
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Add welcome message with {Username} in the Login Widget
You just need to put it all together in a "wrap" element..
Here is a complete example:
Best regards, waghcwb
Here is a complete example:
- Code:
<style type="text/css">
#greeting{
overflow: hidden;
}
#greetwrap{
float: right;
width: 200px;
}
#avatar img{
max-width: 50px;
background: #fff;
padding: 1px;
box-shadow: rgba(0,0,0,.5) 0 0 3px;
float: right;
}
</style>
<script>
jQuery(function(){
var avatar = _userdata["avatar"];
jQuery('#avatar').append(avatar);
});
</script>
<div id="greeting">
<div id="greetwrap">
<div id="avatar"></div>
Welcome back, <span class="USERLINK">{USERLINK}</span>
</div>
</div>
Best regards, waghcwb
Similar topics
» Move Facebook login button to login widget.
» Different Username and Login ID.
» How to add a icon under the username is message
» We should do a different type of login(email instead of username)
» Login Widget
» Different Username and Login ID.
» How to add a icon under the username is message
» We should do a different type of login(email instead of username)
» Login Widget
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum