Announcement

Collapse
No announcement yet.

Changing The Text "Notifications" and "Messages"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing The Text "Notifications" and "Messages"

    To "Alerts" and "Inbox"

    Is that possible?

  • #2
    Both can be changed in the Phrase Manager

    Comment


    • Cfleet1
      Cfleet1 commented
      Editing a comment
      Thanks. Looks a little difficult. lol

  • #3
    AdminCP - Languages & Phrases - Search In Phrases

    In "Search For Text" box type exact Text Of phrase, i.e. "Notifications" or "Messages"

    Locate the exact match by text, which will only say the exact word by selecting "Exact Match: Yes".

    The phrase varname for Notifications is: $vbphrase[notifications]

    The phrase varname for Inbox is: $vbphrase[messages]

    All you have to do is to write the exact word or phrase you wish to use in the translation box and save.

    You need to do this separately for each phrase.

    Comment


    • #4
      The "messages" phrase variable seems generic and might be used in other places. If you changed it to "Inbox", it might not make sense in other places it is used.

      GIPHY for vB5 | AutoLinker | Video Attachments Player | Last Registered Users Module | Clear System Cache Cron | Drag-n-Drop Upload | Topic AJAX AutoUpdate | Force Read Topic

      Comment


      • #5
        Yeah thanks fellas. I just realized i would have to change all sorts of others things containing those words. Ill pass.

        Thanks for taking the time to write that out In Omnibus

        Comment


        • #6
          I checked and the phrase variables are actually messages_header and notifications_header. It looks like those phrases are only used in the header as they are suffixed by _header. So it is safe to change them in the Phrase Manager.

          GIPHY for vB5 | AutoLinker | Video Attachments Player | Last Registered Users Module | Clear System Cache Cron | Drag-n-Drop Upload | Topic AJAX AutoUpdate | Force Read Topic

          Comment


          • #7
            This is an old thread, but exactly my question, so I hope Glenn or others can still respond.

            I wish to change the notifications_header to "Message Center" and the messages_header to "Contact Users" in vB Connect 5.3.4 (Patch 1).

            I succeeded in using the Phrase Manager to display the updated string for notifications_header, but when I changed messages_header, there was no effect.

            In the Phrase Manager I verified that the value of messages_header had been set to the new value ("Contact Users") but after page refresh, the original value ("Messages") still appears.

            I then searched for "messages_header" in the Templates and found them only in the top_menu_user template (below). I then tried a few brute force edits in the template, such as:
            1. commenting out the call to {vb: phrase messages_header}
            2. removing the call and substituting a hard coded string "Contact Users" (without quotes)
            3. creating a new Phrase (top_menu_contact_users) with the value "Contact Users" and substituting {vb: phrase top_menu_contact_users} for the original call
            None of these brute force changes did anything and the original value of messages_header ("Messages") is still displayed. It appears as if another script is over-writing the changes later in the call chain, but I cannot find where this is occurring.

            I made all the same brute force changes in the parent styles in case this was caused by inheritance, but no success.

            If, however, I use FireFox, and right-click on the Messages item and choose Inspect Element and then manually change the text value at the following div to "Contact Users", I get the effect I wanted:

            Code:
            <div class="b-comp-menu-dropdown__trigger js-comp-menu-dropdown__trigger...er--arrow b-comp-menu-dropdown__trigger--headerbar js-button" tabindex="0">
                 <span class="h-left">Contact Users</span>
            Any suggestions?

            BTW I have no language translations installed. Also, my login has PM and Chat permissions enabled

            TIA

            Code:
            <li class="b-top-menu__item notifications-container js-shrink-event-child">
                    <vb:if condition="$canUsePmSystem">
                        <vb:if condition="!$user['canUsePMChat']">
                            {vb:set urlInfo.action, 'index'}
                            <a class="b-top-menu__item-link" href="{vb:url 'privatemessage', {vb:raw urlInfo}}">
                                <span class="h-left">
            {vb:phrase messages_header}
                                </span>
                                <span class="h-left notifications-count<vb:if condition="empty($unreadCount)"> h-hide-imp</vb:if> js-header-count-contains-notifications">
                                    {vb:number {vb:raw unreadCount}}
                                </span>
                            </a>
                        <vb:else />
                            {vb:set urlInfo.action, 'index'}
                            <a class="b-top-menu__item-link" href="{vb:url 'privatemessage', {vb:raw urlInfo}}">
                                <span class="h-left">
            {vb:phrase notifications_header}
                                </span>
                                <span class="h-left notifications-count<vb:if condition="empty($headerCounts['nonpms_sum'])"> h-hide-imp</vb:if> js-header-count-contains-notifications">
                                    {vb:number {vb:raw headerCounts.nonpms_sum}}
                                </span>
                            </a>
                        </vb:if>
                    <vb:else />
                        {vb:data folders, content_privatemessage, fetchSummary}
                        {vb:set folderlist, {vb:raw folders.folders}}
                        {vb:set folder, {vb:raw folderlist.notifications}}
                        {vb:set routeInfo.folderid, {vb:raw folder.folderid}}
                        {vb:set routeInfo.action, 'notification'}
                        <a class="b-top-menu__item-link" href="{vb:url 'privatemessage', {vb:raw routeInfo}}">
                            <span class="h-left">
            {vb:phrase messages_header}
                            </span>
            Last edited by Cheechako; Sun 11th Feb '18, 10:03am.

            Comment


            • #8
              Try clearing system cache in AdminCP.

              GIPHY for vB5 | AutoLinker | Video Attachments Player | Last Registered Users Module | Clear System Cache Cron | Drag-n-Drop Upload | Topic AJAX AutoUpdate | Force Read Topic

              Comment


              • #9
                Thanks for responding....

                The ACP >> Maintenance >> Clear System Cache only displays the message "The System Cache has been cleared." There is no button to run a clear operation.

                Hmmmmm....What next?

                Comment


                • #10
                  That's already clearing it when you click that link.

                  GIPHY for vB5 | AutoLinker | Video Attachments Player | Last Registered Users Module | Clear System Cache Cron | Drag-n-Drop Upload | Topic AJAX AutoUpdate | Force Read Topic

                  Comment


                  • #11
                    Thanks.
                    In that case, Clear System Cache does nothing to solve this issue.
                    I can change the value for the phrase notifications_header but not messages_header

                    Comment


                    • #12
                      OK, I found it....as I suspected there was another {vb: phrase} entering the original value.

                      I found it by inspecting the top_menu_user template again and this time I noticed a reference to the inclusion of another template: {vb: template pmchat_message_header} (see Code box below).

                      When I inspected that other template, I found the phrase {vb: phrase vbmessenger_header} Using the Phrase Manager to change the value of vbmessenger_header did the trick. Now my site displays "Contact Users" as the menu text for the drop-down next to the Login Username.

                      Bingo. Whew!

                      Thanks for everyone's help.


                      Code:
                        ... 
                          <vb:comment>** vB Messenger **</vb:comment>
                          {vb:template pmchat_message_header, headerCounts={vb:raw headerCounts}}
                      
                          <vb:comment>** Username menu **</vb:comment>
                          {vb:set data.userid, {vb:raw user.userid}}
                          <vb:comment>
                         ...

                      Comment

                      Loading...
                      Working...
                      X