Add Hi, John Doe on the top right template

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Jul 15, 2012 12:13 pm
Reply with quote
Report this post
Hi,

how can I add "Hi, John Doe" after someone has logged next login link on the top right of the template.
User avatar
Expert Boarder

GK User
Tue Jul 17, 2012 10:01 am
Reply with quote
Report this post
Nobody have a response :oops:
User avatar
Expert Boarder

GK User
Wed Jul 18, 2012 10:31 am
Reply with quote
Report this post
Hi,

I followed the gavick documentation to add a module position. After, I created a login module that I placed in the top right of my page. What I want now is to hide the logout button (Déconnexion) to only have Hi, Super User.

user.png
User avatar
Expert Boarder

GK User
Wed Jul 18, 2012 12:49 pm
Reply with quote
Report this post
You have to override in the template file html/com_users/login/default_logout.php (use for the defaut.php file content file components/com_users/views/login/tmpl/default_logout.php).
User avatar
Administrator

GK User
Wed Jul 18, 2012 1:03 pm
Reply with quote
Report this post
How can I do to hide the logout button ?
User avatar
Expert Boarder

GK User
Wed Jul 18, 2012 1:10 pm
Reply with quote
Report this post
You will have to remove this code:

Code: Select all
<form action="<?php echo JRoute::_('index.php?option=com_users&task=user.logout'); ?>" method="post">
      <div>
         <button type="submit" class="button"><?php echo JText::_('JLOGOUT'); ?></button>
         <input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('logout_redirect_url', $this->form->getValue('return'))); ?>" />
         <?php echo JHtml::_('form.token'); ?>
      </div>
   </form>


in the mentioned file.
User avatar
Administrator

GK User
Wed Jul 18, 2012 1:17 pm
Reply with quote
Report this post
in the template file html/com_users/login/default_logout.php I have removed the code you say below but I have always appear my logout button.

For information, I want only hide or removed the logout button on my login module who is on my new position "topright" to have only Hi, John Doe.

But I don't want remove the logout button on the popup login.
User avatar
Expert Boarder

GK User
Wed Jul 18, 2012 2:01 pm
Reply with quote
Report this post
In this case you will have to use the display:none; CSS rule. Do you have some unique class or ID in the wrapper around this text?
User avatar
Administrator

GK User
Wed Jul 18, 2012 5:07 pm
Reply with quote
Report this post
What I do for the moment is to create a new position (his name is topright) and activated a module login in this position. After I add on the template.css file the rule below and on my module login I add a class suffix "button" :

Code: Select all
#gkTopright.button{
   display:none;
}


Sorry but that doesn't work. What are the file I must change and how.

Thanks for your help.
User avatar
Expert Boarder

GK User
Wed Jul 18, 2012 5:53 pm
Reply with quote
Report this post
Could you provide me an URL to your website? Or the HTML code from the source code of your page?
User avatar
Administrator

GK User
Thu Jul 19, 2012 4:26 pm
Reply with quote
Report this post
Hi dziudek,

I have send you a PM with my website and backend url with login and password.

Thanks.
User avatar
Expert Boarder

GK User
Thu Jul 19, 2012 6:11 pm
Reply with quote
Report this post
I'm sorry but I've still no PM messages from you - could you copy and send your PM message to dziudek[at]gavick[dot]com?
User avatar
Administrator

GK User
Wed Jul 25, 2012 12:57 pm
Reply with quote
Report this post
Hi dziudek,

I have send you an email at your adress dziudek[at]gavick[dot]com with the url and login-password of my website.

Thanks for help.
User avatar
Expert Boarder

GK User
Thu Jul 26, 2012 9:03 pm
Reply with quote
Report this post
Did you replaced the [at] to "@" and [dot] to "." ? Because I still don't have an email from you :/
User avatar
Administrator

GK User
Fri Jul 27, 2012 11:01 am
Reply with quote
Report this post
Hi dziudek,

I have send you my access in a second email. Thanks.
User avatar
Expert Boarder

GK User
Fri Jul 27, 2012 12:49 pm
Reply with quote
Report this post
Please add the following code at the end of the template.css file:

Code: Select all
/* Hide the logout button */
#gkTopright .button {
    display:none;
}
#gkTopright .login-greeting {
    margin-right: 0;
}
User avatar
Administrator

GK User
Fri Jul 27, 2012 3:29 pm
Reply with quote
Report this post
Thanks dziudek, that's work. All is ok :D
User avatar
Expert Boarder


cron