Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.3 fully supports PHP 7. Get it now!

How to remove image and replace it with text?

This discussion is related to the Steam Sign In addon.

I was wondering how I would go about removing the "sign in with steam" image and replacing it with text so i can style it like a button. Any help would be greatly appreciated

Comments

  • I seem to have solved my problem by removing the code starting at line 88 - 90

    (Img($Image, array(
                'alt' => $ButtonTitle
      ))

    Then add $ButtonTitle in it's place and it should work.

    return Anchor( 
                $ButtonTitle,
                $SigninURL, 'SocialIcon SocialIcon-OpenID HasText PopupWindow', array(
                'popupHref' => $PopupSigninURL,
                'popupWidth' => 800,
                'popupHeight' => 550,
                'id' => 'SteamSignIn',
                'title' => $ButtonTitle
            ));

    what it looks like after modifying.
  • GalexrtGalexrt New
    edited February 17

    From what I know, Valve disallows changing/modifying and even enforces you to use the original sign in image.
    As you already mentioned: To remove the image, change the Img($Image, array(...)) function to what you want.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Doing it that way isn't a solution, it's a hack. The disadvantage is that you risk losing all the work you do by now if you update that plugin.

    To my opinion it should be able with CSS:

    #SteamSignIn > img {
        display: none;
    }
    
    #SteamSignIn::after {
        content: "Sign in with Steam";
    
        background-color: #808080;
        color: #ffffff;
    
        margin: 5px;
        padding: 5px;
    }
    

    By the way: there is steam connect plugin offered by Vanilla. I do not know which one of both is better.

    Galexrt
Sign In or Register to comment.