HomeHome  
  • WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • FAQFAQ  
  • SearchSearch  
  • MemberlistMemberlist  
  • UsergroupsUsergroups  
  • RegisterRegister  
  • Log inLog in  
  • You are not connected. Please login or register


    Hiding topics & post

    avatar
    • ****


        Reputation : 2
        Registered on : 2014-05-29
        Posts : 61
        Love Fmcodes
      Hi fmcodes community,
      I was wondering if it's possible to provide the code necessary to allow moderators to able to hide post and topics.

      Not deleting, but a way where you just click hide topic and it'll be only available to moderators+

      example from a IPB forum that I manage:



      Last edited by Brennan on Fri May 30, 2014 9:15 pm; edited 1 time in total

      avatar
      • Administrator

          Reputation : 315
          Registered on : 2012-02-22
          Posts : 2362
          School of codes courses: coming soon
        Can you provide me your forum version?

        maybe I can do something



        Niko wants you in the team Guest

        Community manager and Administrator at Forumattivo.com

        avatar
        • ****


            Reputation : 2
            Registered on : 2014-05-29
            Posts : 61
            Love Fmcodes
          Niko wrote:Can you provide me your forum version?

          maybe I can do something

          My forum version is punbb :)

          avatar
          • Administrator

              Reputation : 315
              Registered on : 2012-02-22
              Posts : 2362
              School of codes courses: coming soon
            So, create a new javascript code and add this content
            Code:
            $(document).ready(function(){

            var r='.post:eq(0) .i_icon_edit';if(jQuery('.posthead h2 img[src!="SUBJECTICON"]:eq(0)').length&&jQuery(r).length){jQuery(p.posting').append('  <a href="'+jQuery(r).parent().attr('href')+'&solved=true"><img src=BUTTONFORMOD></a>')};if(location.href.match(/&solved=true/)){jQuery('form[name="post"]').append('<input type=hidden name=post_icon value=ICONID>');p=document.getElementById('post_icon_ICONID');if(p){p.checked=true};jQuery('input[name="attach_sig"]').attr('checked',false);jQuery('.submit-buttons input[name="post"]').click()};

            });
            replace BUTTONFORMOD with the image link that will be seen to hide the topic (seen in the topics)
            replace SUBJECTICON with an icon that will be used only for moderator topics (create a subject icon in the ACP)
            replace ICONID with the id of the subject icon (the first icon is 1, the second 2, etc...) without counting the default one tha is the number 0

            Actually, this code will change the subject icon to the one you set if someone click on the button



            for now, tell me if this works :bene:



            Niko wants you in the team Guest

            Community manager and Administrator at Forumattivo.com

            avatar
            • ****


                Reputation : 2
                Registered on : 2014-05-29
                Posts : 61
                Love Fmcodes
              Ok, thank you!yes
              I'll contact you if something doesn't work with this code  Smiley

              avatar
              • Administrator

                  Reputation : 315
                  Registered on : 2012-02-22
                  Posts : 2362
                  School of codes courses: coming soon
                actually this just add the icon if you click on the button

                if this works, let me know and I wll give you the second part



                Niko wants you in the team Guest

                Community manager and Administrator at Forumattivo.com

                avatar
                • ****


                    Reputation : 2
                    Registered on : 2014-05-29
                    Posts : 61
                    Love Fmcodes
                  I'm a bit confused with replace SUBJECTICON with an icon that will be used only for moderator topics (create a subject icon in the ACP)

                  avatar
                  • Administrator

                      Reputation : 315
                      Registered on : 2012-02-22
                      Posts : 2362
                      School of codes courses: coming soon
                    try following this tutorial:
                    https://www.fmcodes.com/t1026-switch-subject-icons-with-a-button

                    actually you have to create a subject icon (do you know how to?)
                    then, place the image you choose to that "variable"



                    Niko wants you in the team Guest

                    Community manager and Administrator at Forumattivo.com

                    avatar
                    • ****


                        Reputation : 2
                        Registered on : 2014-05-29
                        Posts : 61
                        Love Fmcodes
                      I still have no idea how to use a subject icon.

                      It is ok if i don't have a hide topic thing, its just a nice essential to see on a forumotion forum!  :bene:

                      avatar
                      • Administrator

                          Reputation : 315
                          Registered on : 2012-02-22
                          Posts : 2362
                          School of codes courses: coming soon
                        so it is "solved"

                        you leave the issue?



                        Niko wants you in the team Guest

                        Community manager and Administrator at Forumattivo.com

                        avatar
                        • ****


                            Reputation : 2
                            Registered on : 2014-05-29
                            Posts : 61
                            Love Fmcodes
                          Yeah, you can mark this as solved:) 

                          Thanks for your help, niko!

                          avatar
                          • Support Moderator

                              Reputation : 8
                              Registered on : 2014-03-11
                              Posts : 299
                              Helping on the forum
                            ~Removed (ddoesmc)



                            Last edited by ddoesmc on Sun Jun 08, 2014 7:02 pm; edited 1 time in total



                            FMCodes Support Moderator

                            I am very active now! Feel free to PM me anytime.
                            avatar
                            • Administrator

                                Reputation : 315
                                Registered on : 2012-02-22
                                Posts : 2362
                                School of codes courses: coming soon
                              Hello

                              try this resource: https://www.fmcodes.com/t1028-remove-some-topics-only-for-some-groups

                              it should work with your forum version :Good:



                              Niko wants you in the team Guest

                              Community manager and Administrator at Forumattivo.com

                              avatar
                              • ****


                                  Reputation : 2
                                  Registered on : 2014-05-29
                                  Posts : 61
                                  Love Fmcodes
                                Yay, thanks! I'll try this out asap

                                I'll keep you updated.

                                avatar
                                • Administrator

                                    Reputation : 315
                                    Registered on : 2012-02-22
                                    Posts : 2362
                                    School of codes courses: coming soon
                                  done only for you u.u

                                  let me know if it works



                                  Niko wants you in the team Guest

                                  Community manager and Administrator at Forumattivo.com

                                  avatar
                                  • ****


                                      Reputation : 2
                                      Registered on : 2014-05-29
                                      Posts : 61
                                      Love Fmcodes
                                    aha ;)

                                    I replied on the tutorial with the outcome!

                                    avatar
                                    • Administrator

                                        Reputation : 315
                                        Registered on : 2012-02-22
                                        Posts : 2362
                                        School of codes courses: coming soon
                                      Brennan wrote:Hey Niko!
                                      I think I did everything correctly, nothing is showing up. Can you tell me if I did this correct:

                                      Code:
                                      $(document).ready(function(){
                                          if (typeof _userdata === "undefined") return;
                                          if (_userdata["session_logged_in"] = '1' && jQuery('img').length > '1' && _userdata["user_level"] != '1') {

                                      $('img[src="http://i61.tinypic.com/o7orpk.jpg"]').closest('tr').remove();

                                        };

                                      });

                                      Name: Hide
                                      Where: In the topics

                                      actually it's in all the pages :bene:



                                      Niko wants you in the team Guest

                                      Community manager and Administrator at Forumattivo.com

                                      avatar
                                      • ****


                                          Reputation : 2
                                          Registered on : 2014-05-29
                                          Posts : 61
                                          Love Fmcodes
                                        Niko wrote:
                                        Brennan wrote:Hey Niko!
                                        I think I did everything correctly, nothing is showing up. Can you tell me if I did this correct:

                                        Code:
                                        $(document).ready(function(){
                                            if (typeof _userdata === "undefined") return;
                                            if (_userdata["session_logged_in"] = '1' && jQuery('img').length > '1' && _userdata["user_level"] != '1') {

                                        $('img[src="http://i61.tinypic.com/o7orpk.jpg"]').closest('tr').remove();

                                          };

                                        });

                                        Name: Hide
                                        Where: In the topics

                                        actually it's in all the pages :bene:
                                        Opps, haha.
                                        I changed it, where is it supposed to show now?  :bene:

                                        avatar
                                        • Administrator

                                            Reputation : 315
                                            Registered on : 2012-02-22
                                            Posts : 2362
                                            School of codes courses: coming soon
                                          what? ahahha

                                          Actually does it work?



                                          Niko wants you in the team Guest

                                          Community manager and Administrator at Forumattivo.com

                                          avatar
                                          • ****


                                              Reputation : 2
                                              Registered on : 2014-05-29
                                              Posts : 61
                                              Love Fmcodes
                                            Niko wrote:what? ahahha

                                            Actually does it work?
                                            It's not working, I did change it to where It's supposed to be. Nothing showing up.

                                            avatar
                                            • Administrator

                                                Reputation : 315
                                                Registered on : 2012-02-22
                                                Posts : 2362
                                                School of codes courses: coming soon
                                              Can you give me the cose you used and The permissions you wanted to have?



                                              Niko wants you in the team Guest

                                              Community manager and Administrator at Forumattivo.com

                                              avatar
                                              • ****


                                                  Reputation : 2
                                                  Registered on : 2014-05-29
                                                  Posts : 61
                                                  Love Fmcodes
                                                Yes, this is the code I used.
                                                Code:
                                                $(document).ready(function(){
                                                    if (typeof _userdata === "undefined") return;
                                                    if (_userdata["session_logged_in"] = '1' && jQuery('img').length > '1' && _userdata["user_level"] != '1') {

                                                $('img[src="http://i61.tinypic.com/o7orpk.jpg"]').closest('tr').remove();

                                                  };

                                                });

                                                1 = Administrators view, so only admins could see it.

                                                avatar
                                                • Administrator

                                                    Reputation : 315
                                                    Registered on : 2012-02-22
                                                    Posts : 2362
                                                    School of codes courses: coming soon
                                                  can you provide me Your forum link? thanks



                                                  Niko wants you in the team Guest

                                                  Community manager and Administrator at Forumattivo.com

                                                  avatar
                                                  • Support Moderator

                                                      Reputation : 8
                                                      Registered on : 2014-03-11
                                                      Posts : 299
                                                      Helping on the forum
                                                    Hello

                                                    can this issue be considered solved?
                                                    If not, please post a bump message withing 7 days to let us know you still need assistance

                                                    Thank you very much thanks



                                                    FMCodes Support Moderator

                                                    I am very active now! Feel free to PM me anytime.
                                                    avatar
                                                    • Support Moderator

                                                        Reputation : 8
                                                        Registered on : 2014-03-11
                                                        Posts : 299
                                                        Helping on the forum
                                                      Archived



                                                      FMCodes Support Moderator

                                                      I am very active now! Feel free to PM me anytime.


                                                      YOUR BANNER HERE
                                                      728x90
                                                      DMCA.com Protection Status
                                                      © PunBB | Contact | Report an abuse