News:

Wondering if this will always be free?  See why free is better.

Main Menu

Hide Content

Started by kelvincool, January 03, 2015, 11:08:17 PM

Previous topic - Next topic

kelvincool

Link to the mod

Hide Content



Hide Content provides the ability to hide certain parts of a post based on a number of specified criteria.

Requirements

This mod requires PHP 7.4.10 or above.

This mod will not work without Javascript, it has been tested in Firefox 99, Chrome 100.0.4896.127 and IE Edge 101.0.1210.32.

Out of the Box

By default, the following plugins are available to use:
  • Hide By Post Count - restrict content to be viewable to users who have equal or greater post count required.
  • Hide By Login - restrict content to be viewable to logged-in users only.
  • Hide By Group - restrict content to be viewable to users belonging to a specified group, please note you can select multiple groups with this plugin, it will act as an OR condition for each group.
  • Hide By Liked - restrict content to be viewable to users who like the post.

Extensible

This mod is written to be extensible by other mods, the above plugins are all written this way. Writing a plugin for this mod is just a case of implementing some hooks, please see the above plugins for example code.

Say Thanks now supports this mod.

Additional Notes and known limitations

  • Admins and moderators with required permissions can view any content without restriction
  • You cannot quote hidden content
  • The hide tag is not designed to be nested inside another hide tag
  • The permissions only hides the BBC button, the permissions do not stop the functionality working
  • If the original poster does not meet their own requirements they will also not see the content, however they can still edit the post. (only for SMF 2.0.x versions)

Translation Credits
Turkish - gevv

Resource Credits

Hidden icons created by Freepik - Flaticon
1.x.x Icon courtesy of Yusuke Kamiyamane (http://www.iconfinder.com/icondetails/26317/16/exclamation_eye_view_alert_warning_icon)
1.x.x Base for modal window http://www.the-art-of-web.com/javascript/feedback-modal-window/

Support

Support for this modification can be found in the support topic.




This work is licensed under a Creative Commons Attribution 3.0 Unported License

Arantor

Doesn't seem to account for SSI or RSS feeds?

kelvincool

Thanks Arantor, been a long time since I've touched SSI.

Put out a new version to support both of these.

langel

Awesome mod!! Thanks for sharing it!

@kelvincool Great work +10
Me podran vetar de mil foros pero nunca me callaran!!

motosimak

hi, set of modes, but there was a problem with Quote Posts

kelvincool

Quote from: motosimak on January 11, 2015, 11:25:36 AM
hi, set of modes, but there was a problem with Quote Posts

Can you explain in more detail the problem?

BTW, thanks langel, glad you found it useful.

motosimak

You can see the problem on my forum: http://knowpc.ru/windows-vista7/rusifikacija-windows-7-home-premium/

Highlight text citation.

The same problem is the allocation of a number of conditions: the number of messages and user groups

Members login: Test
password: 123

kelvincool

Sorry I'm not sure what I'm supposed to be looking for here. What do you mean by "Highlight text citation" first of all?

What is the problem with allocation of the conditions, is it not working? You know that the author can see their own posts right?

motosimak

Writing through the Google translator :)

quoting the text does not work.

A feeling that is conflicting jQuery library


motosimak

conflict with Simple Portal 2.3.6
after removal, the problem was resolved

up:
Does not retain the default values when selecting a group. Always check marks are 4 groups

kelvincool

Not sure what the conflict was with Simple Portal, still not sure what you mean by the quoting doesn't work, I tried it quoting and the preview seemed fine. Are you quoting something that is hidden or just normal text? Which topic has some hidden posts in them?

Are the 4 groups the ones you've marked as default in the admin section?

I'm also having to use google translate to view your website  :laugh:

motosimak

Quoting plain text

I will try to install version 2.3.5, because Quote problem arose not only from me.

http://www.simplemachines.ru/index.php?topic=17785.msg143406#msg143406
Too, is version 2.3.6

kelvincool

OK I installed Simple Portal and I can see the issue with using the Insert Quote button. I'm looking into what's conflicting here.

motosimak

fine, thank you
Of course, maybe I'm wrong, but after removing it, quoting earned :)

If the default select multiple checkboxes in groups, it does not save them, only one.

To save each group need to press save

kelvincool

I worked out what the conflict was, Simple Portal is adding it's own templates into the quote fast when it shouldn't. I can change the way I'm doing my bit.

The issue with the checkboxes sound like a browser issue, which browser and version are you using?

motosimak

I tested on: Chrome 39, firefox 34, IE 11.


motosimak

Can be configured to put the default choice only messages? But if the user wants to select a group and even to hit a tick in the group is selected.

Now if the administration panel includes a plug group, make sure the default is what that group.

And I would like to group chosen by the user and when necessary

kelvincool

When you said the groups don't save, were you talking about the admin settings page? I assumed you were talking about when you are posting a message and you select the group. In any case it's not a browser problem as I've been using Firefox 34 too and don't have the issue.

About your suggestion for default choice, I know what you mean and I will implement it together with this Simple Portal conflict.

motosimak

I'm talking about adminpanel said.

And you can see in the update? - Show the number of messages that left dial to open the content. Now just limit costs such as 100 messages.

kelvincool

New version released.

1.1

  • Improved compatibility with Simple Portal - quote fast works now
  • Ability to disable on certain boards
  • Ability to disable on PM
  • Ability to check plugins to be used by default
  • Post count required now includes remaining posts total required

Advertisement: