Announcement

Collapse
No announcement yet.

Post Footer Translate Button

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Oh nooo... this would be around 230 languages! It is good in the way it is.

    Click image for larger version

Name:	grafik.png
Views:	77
Size:	18.8 KB
ID:	30976

    Comment


    • glennrocksvb
      commented
      Editing a comment
      Right, that's why I chose the shorter solution.

    #17
    I've added the CSS code in the first post for easy reference.
    Buy me a coffeePayPal QR Code
    My Amazon Affiliate Link
    Fast vBulletin VPS Host:
    This site is hosted by IONOS

    Comment


      #18
      Her is an example with some selcted languages

      Code:
      /* Translate - START */
      
      .postfooter_translate-container select option:not([value=auto], [value=en], [value=de], [value=fr], [value=nl], [value=pl], [value=tr], [value=da], [value=es]
      
      
      ) {
          display: none;
      }
      
      /* Translate - END */​

      Comment


        #19
        I like to colorize the button-text and do that by adding some html to the Phrase (Phrase Manager). But, that made the translate button not work anymore. Therefore I made two changes.

        Template: hook_postfooter_translate_click
        change
        Code:
        {vb:phrase postfooter_translate_translate}
        into
        Code:
        {vb:phrase postfooter_translate_translate_text}
        add a New Phrase:
        var = postfooter_translate_translate_text
        text = Translate

        --> update style & language cache (see readme.txt)

        Click image for larger version

Name:	color-buttons.jpg
Views:	77
Size:	11.6 KB
ID:	31415

        Comment


        • glennrocksvb
          commented
          Editing a comment
          Nice work but you can customize the Translate button using custom CSS in cas_additional template. I will check and post the code later. Editing the template is not recommended as you may get merge conflicts when you upgrade the mod in the future.

        #20
        zomboo, revert the changes in the template by clicking the Revert button and delete the new phrase you added.

        Then add this custom CSS in css_additional.css template to customize the "Translate" text label:

        Code:
        .js-post-control__translate .b-post-control__label {
            color: green;
            font-weight: bold;
        }
        Update/add CSS properties to style the text as needed.

        If you also need to change the hover color, then add this:
        Code:
        .js-post-control__translate .b-post-control__label:hover {
            color: blue;
        }
        Last edited by glennrocksvb; 02-01-2025, 10:51 PM.
        Buy me a coffeePayPal QR Code
        My Amazon Affiliate Link
        Fast vBulletin VPS Host:
        This site is hosted by IONOS

        Comment


          #21
          Thanks for the code. I should have thought of that, css is better.
          My mind is still in the vb4 era where we had a lot of mods.​

          Comment


          • glennrocksvb
            commented
            Editing a comment
            Glad to help!

          #22
          I have upgraded to VB 6.1.1.

          This mod is working fine with this version.

          Comment


          • glennrocksvb
            commented
            Editing a comment
            Thanks for confirming the mod still works in vB 6.1.1.

        Latest Posts

        Collapse

        Working...
        X
        Searching...Please wait.
        An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

        Please push the back button and reload the previous window.'
        An unexpected error was returned: 'Your submission could not be processed because the token has expired.

        Please push the back button and reload the previous window.'
        An internal error has occurred and the module cannot be displayed.
        There are no results that meet this criteria.
        Search Result for "|||"