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.

Add a description before menu image on the comments

steamsteam
edited November 2015 in Vanilla 2.0 - 2.8

Hi,
I want to add a description to appear before image options drop-down menu on the comments.

I added on DiscussionController_CommentOptions_Handler echo "options"; and remains static description, but I want it appears and disappears with the image description options. I tried to play with styles but can not get it to work.

Thank you.

Tagged:

Comments

  • You want it to say options? It actually already does but the text is hidden with CSS so the background image of the cog shows instead of the text as it did in 2.0 . You can disable the background image and change display:none to display:block in the theme CSS for options menu title.

  • @vrijvlinder dijo:
    You want it to say options? It actually already does but the text is hidden with CSS so the background image of the cog shows instead of the text as it did in 2.0 . You can disable the background image and change display:none to display:block in the theme CSS for options menu title.

    I want to add the description on the side of image. I do not want to remove the image

  • edited November 2015

    Then you need to make the text display and write the CSS for the span so it shows beside it. Another option is to use jquery to perpend the options title with your text .

    http://api.jquery.com/prepend/

  • Looking at the code I see this:
    echo '<span class="OptionsTitle" title="'.t('Options').'">'.t('Options').'</span>';
    So I guess you would be able by adding $Definition['Options'] = 'tralala'; to your locale

  • @R_J said:
    Looking at the code I see this:
    echo '<span class="OptionsTitle" title="'.t('Options').'">'.t('Options').'</span>';
    So I guess you would be able by adding $Definition['Options'] = 'tralala'; to your locale

    No, he wants it to say options as I understand it. In 2.0 it had text not a cog. He wants to add the word options next to the cog.

    But the word "Options" is hidden with css so the cog shows instead.

  • steamsteam
    edited November 2015

    I want to add the description on the side of image when it appears.
    As in the screenshot:

    If change in locale description appears only changed the title:

    It seems silly but I'm getting hooked ;) I could change the image by other with my description but I do not really like this solution.

    I want to do this because I see that not all users find these options.

  • I haven't invested much time on this: the text had already been there and you do not need any locale at all to let it appear. You will need some CSS like that:

    .OptionsTitle {
        color: black;
        font-size: 12px;
        line-height: 18px;
        width: auto;
        padding: 0 0 0 20px;
    }
    

    You'll have to tweak it a bit, though.

  • steamsteam
    edited November 2015

    @R_J dijo:
    I haven't invested much time on this: the text had already been there and you do not need any locale at all to let it appear. You will need some CSS like that:

    .OptionsTitle {
        color: black;
        font-size: 12px;
        line-height: 18px;
        width: auto;
        padding: 0 0 0 20px;
    }
    

    You'll have to tweak it a bit, though.

    It's working and solution is simple and great ! :)

    Many thanks @R_J

  • Yes that is what I told you that was needed from the first comment I posted....

Sign In or Register to comment.