DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Disabling the message and notifications options of the USER theme object

Sort:
You are not authorized to post a reply.





New Around Here





    I want to disable the messages and the notifications options of the USER theme object.
    I have searched the doc and have found nothing on this subject. Only the list of parameters of the theme object.
    Nothing in the settings menu seems to manage this.

    I've tried deleting the activity feed page (which I don't need in our case) and it does not help.
    I've tried deleting the associated items of the list found in the user.ascx file, but this causes an error in DNN.

    There is surely an option to deactivate this. I'm using DNN 9.6. Where is it?
    This is driving me crazy

    Thank you in advance!






    Veteran Member





      Did you try

       < dnn:USER ID="dnnUser" runat="server" LegacyMode="false" />






      New Around Here





        Hello Timo,

        Yes this is how it is set up at this moment.





        Veteran Member





          ok sorry, did you try it with LegacyMode = true?






          Veteran Member





            Bernard,

            have a look at the DnnBootsterV2 theme by Geoff Barlow, the file /layouts/topbar-user-functions.ascx could lead in the right direction.

            [...]

            {dnn:USER ID="dnnUserNotifications" runat="server" LegacyMode="false" CssClass="notifications" /}

            [...]

            {dnn:USER ID="dnnUserMessages" runat="server" LegacyMode="false" CssClass="messages" /}

            [...]

            {dnn:USER ID="dnnUserProfile" runat="server" LegacyMode="false" CssClass="profile" /}

            Replace { by < and } by >.

            Happy DNNing!
            Michael

            Michael Tobisch
            DNN★MVP

            dnnWerk Austria
            DNN Connect





            New Around Here





              Hello Michael,

              Thank you for your answer.
              I'm perplexed. Because when I use the USER tag, it renders all these things, plus the avatar div.

              In his template, he has 3 different calls to the USER tag. And he only switches IDs and classes. I've tried it in my template, in case there was some undocumented events happening when using these IDs, but it doesn't work for me.

              Here is what I tried in my theme:
              < dnn:USER ID="dnnUser" runat="server" LegacyMode="false" />
              < dnn:USER ID="dnnUserMessages" runat="server" LegacyMode="false" CssClass="messages" />

              I only get the USER tag rendered twice.

              The solution I have for now is to hide the unwanted items via css with a display none.

              #login .userNotifications, #login .userMessages, #login .userProfileImg {
              display:none;
              }





              New Around Here





                Follow up information.
                I just saw that this is also the solution in the dnn booster theme.
                I found this in the dnnbooster.css file
                https://github.com/dnncon...nnbootster.css 

                .dnnbooster header .topbar .general-functions li .message-holder .buttonGroup .userDisplayName {display: none; }
                .dnnbooster header .topbar .general-functions li .message-holder .buttonGroup .userProfileImg {display: none; }
                .dnnbooster header .topbar .general-functions li .message-holder .buttonGroup .userNotifications {display: none; }






                Veteran Member





                  As Timo said, try LegacyMode="true". He mis-typed the first time
                  Joe Craig
                  DNN MVP
                  Patapsco Research Group





                  New Around Here





                    Oh! I had skipped Timo's reply. Thanks you for making me notice Joe!

                    Sorry Timo! :) You were right, it worked!
                    With legacymode="true", the notifications, messages and avatar divs do not appear.

                    Thank you all for you help!







                    Veteran Member





                      Posted By Bernard Ouellet on 24 Nov 2020 08:20 PM
                      Oh! I had skipped Timo's reply. Thanks you for making me notice Joe!

                      Sorry Timo! :) You were right, it worked!
                      With legacymode="true", the notifications, messages and avatar divs do not appear.

                      Thank you all for you help!

                       

                      You should never skip my replies ;-)
                      Just kidding, glad it helped

                       

                       

                      You are not authorized to post a reply.

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved