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.
Options

Replace Sign In/Sign Out with images?

I'd like to replace the text links for signing in and out with images, but I'm having a hard time locating where the code is. I replaced the other menu links with images by editing my default.master.tpl. The sign in/out portion though says

{custom_menu} <li>{link path="signinout"}</li>

So where is this from? Thanks in advance.

Comments

  • Options
    422422 Developer MVP
    edited March 2013

    how about

    < li class="myicon">

    etc then creating some rules in css

    There was an error rendering this rich post.

  • Options

    @422 said:
    how about

    < li class="myicon">

    etc then creating some rules in css

    But how do I tell it to display one image when they're signed out and then another when they're signed in? Can that be done via CSS?

  • Options
    422422 Developer MVP

    addClass using jquery

    There was an error rendering this rich post.

  • Options

    @422 said:
    addClass using jquery

    Would you mind pointing in the right direction to learn about this? I Google'd quickly but came up empty. I know nothing about jquery.

  • Options

    search google for addClass jquery you will probably see lots of examples on other sites

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited March 2013

    li.NonTab.SignOut is the class of the in and out button

    you could :
    Hide the original link with css and add a new link with an image in the theme hooks, I can't get a user image on the menu instead of the name if my life depended on it , but I have been successful in adding image links to the menu like this.

    
    $Sender->Menu->AddLink('SignOut', Img('themes/PurpleHazeEmbedFriendly/design/images/signout.png', array('title' => T('SignOut'))), 'Entry/signout',  array('class' => 'Button'));   
    
    $Sender->Menu->AddLink('Entry', T('Sign In'), Img('themes/PurpleHazeEmbedFriendly/design/images/signin.png','Entry/signin', array('class' => 'Button'));
    

    you would need to add this to every controller in the theme hooks . Use

    li.NonTab.SignOut{display:none!important;} to remove the original text link

Sign In or Register to comment.