Link to the mod (https://custom.simplemachines.org/index.php?mod=4013)
Hide Content
Hide Content provides the ability to hide certain parts of a post based on a number of specified criteria.
RequirementsThis 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 BoxBy 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.
ExtensibleThis 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 (http://custom.simplemachines.org/mods/index.php?mod=3898) 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 CreditsTurkish - gevv
Resource CreditsHidden icons created by Freepik - Flaticon (https://www.flaticon.com/free-icons/hidden)
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/
SupportSupport for this modification can be found in the support topic.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.creativecommons.org%2Fl%2Fby%2F3.0%2F80x15.png&hash=e2441d8ee83709b284e795913d60f5b7dfdd41f4) (http://creativecommons.org/licenses/by/3.0)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0)
Doesn't seem to account for SSI or RSS feeds?
Thanks Arantor, been a long time since I've touched SSI.
Put out a new version to support both of these.
Awesome mod!! Thanks for sharing it!
@kelvincool Great work +10
hi, set of modes, but there was a problem with Quote Posts
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.
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
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?
Writing through the Google translator :)
quoting the text does not work.
A feeling that is conflicting jQuery library
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
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:
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
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.
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
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?
I tested on: Chrome 39, firefox 34, IE 11.
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
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.
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.
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
Everything works fine , thank you!
The only problem is fixed menu "hide". If a lot of groups and a check mark on the groups , it is impossible to apply the provisions of hiding .
If you can, make a floating menu options to hide or location horizontally
Ps: Theme Resseller
Resolution1280 * 1024
I test at work
I will look into that for the next release, you need over 20 groups to cause that issue.
And you can make the ban hidden content indexing by search engines ?
Example indexing:
Yandex.ru
search query: (url:www.knowpc.ru/programmirovanie/paket-programm-dlja-nakrutki-youtube-and-adfly/ | url:knowpc.ru/programmirovanie/paket-programm-dlja-nakrutki-youtube-and-adfly/)
That has happened because the content of the first post has been used as the meta description and that is not processed by the BBC parser. Are you using a mod to make the first post content the meta description? Usually it's the topic title.
It's going to be quite difficult to fix that issue, for the time being I suggest posting your hidden content in the second post or having more description before your hidden content.
You can add ?:
1. hide time user registration
2. hide for a particular nick or more nicknames separated by commas
1. That is a weird condition to hide content with, what would you say? "You must be registered for 7 days before you can see this content"? What would be the point in doing this other than delaying them?
2. Why not just send a PM instead?
Have unique content that should see only the guests of the forum, but not those who scored most messages and moved to another group.
Date of registration is just perfect for this
Can you hide by rank? Like only mods or admins can see it?
Quote from: motosimak on January 30, 2015, 12:40:30 AM
Have unique content that should see only the guests of the forum, but not those who scored most messages and moved to another group.
Date of registration is just perfect for this
There's already a hide by registration option which hides content from guests, is that what you want?
Quote from: NekoJonez on January 30, 2015, 08:31:48 AM
Can you hide by rank? Like only mods or admins can see it?
Do you mean hide by group? That is already an option in the mod.
Hi,
I installed this mod since few days now. Need a little piece of advice. When I install this Mod, everyone and anyone can use it. What I needed to do is that only some people can use it. Let's say Mods and some specific group of people and not everyone. Is there a possibility that we can do that?
I am Using Golove Gradient Theme.
Thank You
Regards,
Nikhil
i can't install this mod :o
That does not tell us much.
A little more info is needed, tranhiep_116.
How do I ask support questions the smart way? (http://wiki.simplemachines.org/smf/How_do_I_ask_support_questions_the_smart_way)
How can I get my problems solved faster? (http://wiki.simplemachines.org/smf/How_can_I_get_my_problems_solved_faster)
What types of support are available? (http://wiki.simplemachines.org/smf/What_types_of_support_are_available)
Any Help Anyone?
Quote from: desiamerican26 on February 13, 2015, 08:31:30 PM
I installed this mod since few days now. Need a little piece of advice. When I install this Mod, everyone and anyone can use it. What I needed to do is that only some people can use it. Let's say Mods and some specific group of people and not everyone. Is there a possibility that we can do that?
I can certainly look into including such a permission, what kind of level do you need? I can see two levels to this:
- Level 1: Simply hide the button for users without the permission
- Level 2: Hide and button and disable the hiding feature on their posts so even if they tried manually using the hide tag it won't hide anything
Level 1 is easier to implement but is dependent on the users not knowing about how to use the hide tag, level 2 is a bit more complex and will take more time to implement. Does anyone else need this feature, obviously the more people that need it the more likely I will implement it.
Another option, you can request someone to write a mod that will do permissions for BBC, I can see someone did one for SMF 1 but don't think there's one for SMF 2.
Quote from: tranhiep_116 on February 13, 2015, 10:57:58 PM
i can't install this mod :o
As Burke ♞ Knight says, we need more information.
Quote from: kelvincool on February 14, 2015, 09:48:58 AM
Quote from: desiamerican26 on February 13, 2015, 08:31:30 PM
I installed this mod since few days now. Need a little piece of advice. When I install this Mod, everyone and anyone can use it. What I needed to do is that only some people can use it. Let's say Mods and some specific group of people and not everyone. Is there a possibility that we can do that?
I can certainly look into including such a permission, what kind of level do you need? I can see two levels to this:
- Level 1: Simply hide the button for users without the permission
- Level 2: Hide and button and disable the hiding feature on their posts so even if they tried manually using the hide tag it won't hide anything
Level 1 is easier to implement but is dependent on the users not knowing about how to use the hide tag, level 2 is a bit more complex and will take more time to implement. Does anyone else need this feature, obviously the more people that need it the more likely I will implement it.
Another option, you can request someone to write a mod that will do permissions for BBC, I can see someone did one for SMF 1 but don't think there's one for SMF 2.
Hi Kelvin,
Thank you very much for your reply. I would consider anything that would be easier for you to implement on. I just need that the regular user should not use that option. Let's say I just want certain people like Admins, Mods and those kind of people should have power who posts regular posts for viewers and readers. I guess Level 1 would be better as you say cuz simply hiding for Newbies would be a better idea.
Will wait on your reply.
Regrds,
Nikhil
Hi Kelvin,
Please update me on this if you come up with the update.
Thank You
Regards,
Nikhil
New version released.
1.1.1
- Overflow fix if you have over 20 groups
- Added post and pm permissions to see hide button, by default all groups are allowed
I ended up going with level 1, level 2 would require another query which I didn't want to do
Hi Kelvin,
I installed the new version of this mod. Everything is good but I guess since you have all the member groups checked as default. I think the Default should be for only Admins and Global Moderators. Rest should be checked to give them that role to them. Please see the 2 attached files.
I asked two of my friends to post, in which one is a Junior Member and other is a Newbie. The other Image is I just checked Jr. Member option along with Admin., but the one who is a Newbie can also post hidden contents on site.
Please look into that.
Thank You
Regards,
Nikhil
Quote from: desiamerican26 on February 15, 2015, 01:24:25 PM
I asked two of my friends to post, in which one is a Junior Member and other is a Newbie. The other Image is I just checked Jr. Member option along with Admin., but the one who is a Newbie can also post hidden contents on site.
The default option you checked has nothing to do with the permissions part of the mod, that bit of the settings is just to set which checkboxes appear checked when users want to hide content. Please go to the permissions page to set the permissions.
Hi Kelvin,
I just checked about the Permissions in the backend. I did setup as it should be, but nothing helped. I am guessing the theme might have to do with this, but another thing is that I didn't get any error messages while installing the mod. But I will again look for another theme and try with that. Cuz if this is the issue then it will be sorted out.
Will update you soon with that.
Thank You
Regards,
Nikhil
1.1.2
- Minor fix to naming of permission
Try this new version, I think I understand what's happened there, the naming of the permissions messed with the way the javascript works on the permissions page. Install this version and go back to the permission page, check and uncheck the Hide Content permission, make sure the top level permission (Post topics and replies to the board) is not checked.
Hi Kelvin,
I tried with Cure Themes and Default but it's giving me the same issue. I Asked both of my friends to check and it was the same. I even on the Permission side took away the permissions but they still can access on the front end.
I am not sure if it's just me having the issue or some one else too?
Please look into that.
Thank You
Regards,
Nikhil
Are you using different permission profiles for the board? Do you mind PM'ing me your admin details so I can take a look at your permissions and settings? Because right now I have no idea what the problem is, it works fine for me.
Hi Kelvin,
Please Check you pm. My site: www.desi-american.com
Thank You
Regards,
Nikhil
Hi Nikhil,
Can you update the mod to the latest one? 1.1.2
Give me few Minutes. I will do it right now.
Hi Kelvin,
I updated with the new one. Please check.
Looks like it's working fine now. :)
The hide icon is missing though, guessing you forgot to apply the mod to your custom theme.
This Works Perrrfeecccttt ;D
I mean I see it good when I logged in through IE then I see the image but from Chrome I don't see that.
How can I apply to custom theme?
Thanks a looottt for this Mod...It helps big time. :)
Thank You
Regards,
Nikhil
Leave the idea of this mod, unfortunately I think it might be conflicting with other mod. When I install it I get the following notice
QuoteNotice: Undefined index: session_var in /home/geek/public_html/forum/Sources/Load.php(2250) : eval()'d code on line 521
Notice: Undefined index: session_id in /home/geek/public_html/forum/Sources/Load.php(2250) : eval()'d code on line 521
Any assistance is appreciated it. I have also attached the Load.php file for reference.
Quote from: angsaysrawr on February 20, 2015, 01:21:43 AM
Leave the idea of this mod, unfortunately I think it might be conflicting with other mod. When I install it I get the following notice
QuoteNotice: Undefined index: session_var in /home/geek/public_html/forum/Sources/Load.php(2250) : eval()'d code on line 521
Notice: Undefined index: session_id in /home/geek/public_html/forum/Sources/Load.php(2250) : eval()'d code on line 521
Any assistance is appreciated it. I have also attached the Load.php file for reference.
That's not a conflict issue, it's an issue with the mod, I know what the problem is so a new release will fix this.
Quote from: desiamerican26 on February 18, 2015, 09:22:13 PM
How can I apply to custom theme?
When you install the mod, just make sure the check the theme you want to install it too. You might as well wait for this new release and upgrade.
Quote from: kelvincool on February 20, 2015, 08:46:22 PM
Quote from: angsaysrawr on February 20, 2015, 01:21:43 AM
Leave the idea of this mod, unfortunately I think it might be conflicting with other mod. When I install it I get the following notice
QuoteNotice: Undefined index: session_var in /home/geek/public_html/forum/Sources/Load.php(2250) : eval()'d code on line 521
Notice: Undefined index: session_id in /home/geek/public_html/forum/Sources/Load.php(2250) : eval()'d code on line 521
Any assistance is appreciated it. I have also attached the Load.php file for reference.
That's not a conflict issue, it's an issue with the mod, I know what the problem is so a new release will fix this.
Quote from: desiamerican26 on February 18, 2015, 09:22:13 PM
How can I apply to custom theme?
When you install the mod, just make sure the check the theme you want to install it too. You might as well wait for this new release and upgrade.
I got your point Kelvin. Will wait for next upgrade. :)
Thank You
Regards,
Nikhil
Thank you for the quick follow up. I'll wait for the new release. :)
Hi Kelvin,
This is Kool....I just updated with the New Version and re-applied settings as suggested.
Works Great :)
Thank You
Regards,
Nikhil
1.1.3
- Minor fix to undefined variable warnings
- Permissions now persists after uninstallation unless checkbox to remove data is checked
When updating to the new release you
will need to re-apply any permission settings you've previously set but after this update that will not be needed for future updates.
Quote from: desiamerican26 on February 22, 2015, 11:08:41 AM
Hi Kelvin,
This is Kool....I just updated with the New Version and re-applied settings as suggested.
Works Great :)
Thank You
Regards,
Nikhil
You managed to download that before I decided to withdraw it. :(
Can you use the new version I uploaded instead? You won't have to re-apply any settings for this one.
oopss.....yup i just downloaded the 1.1.3 and replaced with the previous version. And then I changed the settings without getting it checked. It probably just worked I guess.
The New version is 1.1.3, right?
Yes new version is 1.1.3.
Ok kool. So, that's what I updated with and it works fine.
On the side I was wondering if there is any possibility for hiding the Boards. Let's say if I want viewers to open any particular Board after some particular Number of Comments?
Thank You
Regards,
Nikhil
OK a bit confusing, the 1.1.3 version you downloaded was the one I pulled, there is a new 1.1.3 to download now, so I would suggest you download that and install it instead. The reason why I didn't change the version number was because I didn't think anyone downloaded it yet (and I was being lazy :P).
Hiding an entire board is a completely different feature to this mod, remember this is a BBC mod. You can already do what you want in SMF, just use groups that are based on post counts to selectively allow access to a board, you can set this on the modify board page.
Oh no no. I had v1.1.2 I checked before I uninstalled. And then I downloaded the 1.1.3 for the Mod Link.
Hmmm....I need to check on that one. I will update you on that.
Thank You
Regards,
Nikhil
@kelvincool
Your modification is just excellent. If SMF 2.1 comes out you will create this modification to 2.1?
Quote from: jsgrom on March 01, 2015, 12:18:04 PM
@kelvincool
Your modification is just excellent. If SMF 2.1 comes out you will create this modification to 2.1?
Don't see why not, I guess it depends on how much time I have. There shouldn't be a lot to change since I already use hooks.
All right. :)
@Kelvin
I have a question in relation to this information:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2F2pr65mx.png&hash=3972935fa8ef5ac299f8965dbfe42492116ca17a)
In the previous version was shorter information, example: You require a post count of at least 1.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2Fojf7o2.png&hash=920a18e06bff4f3727f06ac1d30a87e13edadd4b)
If is require post count 1 to discovering the content, so why the another information: you need another 1 posts? Cause I don't understand.
----------------------
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi59.tinypic.com%2F2093hgx.png&hash=b4991848090d57a70f8f97dfb906a324101e45c4)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi60.tinypic.com%2F30nbr6x.png&hash=880fc7ba576ae10b3928c12edc7298b287392e68)
I'm enable plugin thanks, write a value 1, it mean that to discover the hidden content in the post have to thanks for this post, when I'm thanked for post this post is still hidden.
What for this option at all is? Why I must thank for the author of the post and additionally must somebody thank me for some my post that I can see the hidden content? It doesn't make sense.
However if I will enable this option:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi62.tinypic.com%2F2yzevme.png&hash=251740c7ee5bbbf822cfe5892e9f505d6e48dbe7)
It will be enough once to thank and the post is discovered. In this modification should be one option i.e. the option of thanking the author of the post and then a hidden content is uncovering itself. Do you understand? As well when I want to write the value: 0 it is still a written value: 1
Quote from: jsgrom on March 10, 2015, 09:40:00 AM
@Kelvin
I have a question in relation to this information:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2F2pr65mx.png&hash=3972935fa8ef5ac299f8965dbfe42492116ca17a)
In the previous version was shorter information, example: You require a post count of at least 1.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2Fojf7o2.png&hash=920a18e06bff4f3727f06ac1d30a87e13edadd4b)
If is require post count 1 to discovering the content, so why the another information: you need another 1 posts? Cause I don't understand.
Someone requested the feature to know how many posts you needed before you could see the content, this makes more sense if your minimum post count condition was higher, like in your second example where it's 200. It'll say "You require a post count of at least 200, you need another 199 posts.". Just to re-iterate this option is
not about posting a reply to see the content, it is about your total post count only. I think that's where you are confused with what it means.
Quote from: jsgrom on March 10, 2015, 09:40:00 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi59.tinypic.com%2F2093hgx.png&hash=b4991848090d57a70f8f97dfb906a324101e45c4)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi60.tinypic.com%2F30nbr6x.png&hash=880fc7ba576ae10b3928c12edc7298b287392e68)
I'm enable plugin thanks, write a value 1, it mean that to discover the hidden content in the post have to thanks for this post, when I'm thanked for post this post is still hidden.
What for this option at all is? Why I must thank for the author of the post and additionally must somebody thank me for some my post that I can see the hidden content? It doesn't make sense.
However if I will enable this option:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi62.tinypic.com%2F2yzevme.png&hash=251740c7ee5bbbf822cfe5892e9f505d6e48dbe7)
It will be enough once to thank and the post is discovered. In this modification should be one option i.e. the option of thanking the author of the post and then a hidden content is uncovering itself. Do you understand? As well when I want to write the value: 0 it is still a written value: 1
Those two plugins do different things, you are misunderstanding the first one called "thank". This specifically refers to the total number of thanks the current user (as in you, not the author of the post) has received. So take your example, you need someone to thank one of your posts before you can see the content, alternatively if you've already got a thank count above 1 than you will see the content straight away.
The second plugin "thanked" is more what you are after where you have to thank the post you are looking at to see the content.
The reason you can't change the value to 0 is obvious, there would be no point in using the condition if you want to specify a thank count of 0. That's basically making it public to everyone.
error logs
8: Undefined index: message
Файл: site.ru/Sources/HideContent.php
Line 196
Quote196: $context['message'] = parse_bbc($context['message'], false, '', array('hide'));
how to fix?
Quote from: motosimak on March 10, 2015, 02:34:34 PM
error logs
8: Undefined index: message
Файл: site.ru/Sources/HideContent.php
Line 196
Quote196: $context['message'] = parse_bbc($context['message'], false, '', array('hide'));
how to fix?
I think I know what's caused this, can you tell me the link that accompanies the error, you don't have to give me the whole thing just the end bit, i.e. something like this
index.php?action=post;quote=15
@Kelvin
QuoteSomeone requested the feature to know how many posts you needed before you could see the content, this makes more sense if your minimum post count condition was higher, like in your second example where it's 200. It'll say "You require a post count of at least 200, you need another 199 posts.". Just to re-iterate this option is not about posting a reply to see the content, it is about your total post count only. I think that's where you are confused with what it means.
All right, I thank for the explanation.
QuoteThose two plugins do different things, you are misunderstanding the first one called "thank". This specifically refers to the total number of thanks the current user (as in you, not the author of the post) has received. So take your example, you need someone to thank one of your posts before you can see the content, alternatively if you've already got a thank count above 1 than you will see the content straight away.
All right, not entirely I understand the brightness of this first plugin "thank". What if no user will thank me too my some post? Then I won't be having access to hidden content by author. Just I need to have a proper count of thanks for my post from users that I could see hidden content. Can you explain me what sensibly meaning does this first pluggin has? Cause honestly I'm surprised something like that.
QuoteThe second plugin "thanked" is more what you are after where you have to thank the post you are looking at to see the content.
Excuse me, but I don't understand what you wrote, you can write me it intelligibly? Just the pluggin "thanked" is a which enables one-time thanking for the post and then contents are visible isn't?
QuoteThe reason you can't change the value to 0 is obvious, there would be no point in using the condition if you want to specify a thank count of 0. That's basically making it public to everyone.
I understand.
Kelvin I would like to suggest you such a suggestion, if in modification Say Thanks are such a options:
Enable withdraw thanks option
Hide thanks count on post
Hide thanks count in profile
Hide top ten thanks stats
Whether you will enter these options into Hide Content in the next update?
Quote from: jsgrom on March 10, 2015, 02:50:33 PM
All right, not entirely I understand the brightness of this first plugin "thank". What if no user will thank me too my some post? Then I won't be having access to hidden content by author. Just I need to have a proper count of thanks for my post from users that I could see hidden content. Can you explain me what sensibly meaning does this first pluggin has? Cause honestly I'm surprised something like that.
If no user thanks your posts then you aren't contributing good content to the forum, the point of this particular plugin is to encourage users to post good content that others will thank them for therefore increasing their thanks count and enabling them to see more content.
Quote from: jsgrom on March 10, 2015, 02:50:33 PM
Excuse me, but I don't understand what you wrote, you can write me it intelligibly? Just the pluggin "thanked" is a which enables one-time thanking for the post and then contents are visible isn't?
Yes the thanked plugin works based on whether the user has thanked the post.
Quote from: jsgrom on March 10, 2015, 02:50:33 PM
Kelvin I would like to suggest you such a suggestion, if in modification Say Thanks are such a options:
Enable withdraw thanks option
Hide thanks count on post
Hide thanks count in profile
Hide top ten thanks stats
Whether you will enter these options into Hide Content in the next update?
Why would these options go into the Hide Content? They are two separate mods. Those options have nothing to do with Hide Content.
example:
Quotehttp://knowpc.ru/index.php?pretty;board=noutbuki;topic=monitor.0&action=post;quote=55040;last_msg=57849
http://knowpc.ru/index.php?pretty;board=simuljatorygonki;topic=sinij-jekran-vo-vremja-zagruzki-fifa-2008.0&action=post;quote=10735;last_msg=10735
http://knowpc.ru/index.php?pretty;board=mmorpgonline-igry;topic=world-of-warcraft.0&action=post;quote=3088;last_msg=56738
@Kelvin
QuoteIf no user thanks your posts then you aren't contributing good content to the forum, the point of this particular plugin is to encourage users to post good content that others will thank them for therefore increasing their thanks count and enabling them to see more content.
All right, if you have such a vision of this plugin. I'll ask also, what if two users or a lot of users will communicate between themselves e.g. on private messages that each of them for everyone will get to like posts? Then it is possible to cheat it this plugin and contents which is hidden will be visible for these people through false clicks of likes.
QuoteYes the thanked plugin works based on whether the user has thanked the post.
All right.
QuoteWhy would these options go into the Hide Content? They are two separate mods. Those options have nothing to do with Hide Content.
You entered in Say Thanks modification a possibility of hiding thanks in the post, in profile, in statistics and withdrawing thanks, so why in the Hide Content modification it cannot be?
I'm not saying the current system is flawless, I do have some ideas on the roadmap to make it better.
Quote from: jsgrom on March 11, 2015, 09:33:11 AM
You entered in Say Thanks modification a possibility of hiding thanks in the post, in profile, in statistics and withdrawing thanks, so why in the Hide Content modification it cannot be?
I honestly don't understand what you mean, what has "hiding thanks in the profile" got to do with the Hide Content mod? The Hide Content mod is just for hiding content in the actual post. The options you are talking about are specific to the Say Thanks mod.
QuoteI'm not saying the current system is flawless, I do have some ideas on the roadmap to make it better.
All right.
QuoteI honestly don't understand what you mean, what has "hiding thanks in the profile" got to do with the Hide Content mod? The Hide Content mod is just for hiding content in the actual post. The options you are talking about are specific to the Say Thanks mod.
You entered the system of thanks into the Hide Content modification and every click is written in the user profile etc., these are statistics, showing how many thanks the given user collected, I just ask why it wasn't possible to shut it off from user profile etc., just to adapt it for oneself just like it is in this second modification.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi58.tinypic.com%2F2vcvqu0.png&hash=42ca2fdae559a325680c82304e220777fc042ea7)
Kelvin...are there any issues with the Core themes using this mod (like the issues with Say Thanks)?
I have to say this is one of he most unusual mods I have seen and one that that is pretty amazing.
Installed and works no issues. Well done and thank you.
Quote from: Dragon41673 on March 23, 2015, 09:10:14 PM
Kelvin...are there any issues with the Core themes using this mod (like the issues with Say Thanks)?
No there shouldn't be any issues with this one.
@SaltedW, glad you found it useful!
I found a little bug.
If a raw URL is given as the hyperlink text for an <a> element inside the [html] BBCode, installing this mod causes that raw text to be output with literal [url]...[/url] wrapped around it inside of the <a></a> HTML element.
For example, this:
[html]
<p>This link will be formatted correctly: <a href="https://www.example.com/" target="_blank">My example link</a>.</p>
<p>This link will not be formatted correctly: <a href="http://www.example.com">http://www.example.com</a>.</p>
[/html]
will appear in the published post looking like this:
This link will be formatted correctly: My example link.
This link will not be formatted correctly: [url]http://www.example.com[/url].
(Note: I had to fake it a bit in the supposed output because of the settings used on this forum here. Just imagine that the underlined bits are live links, and you'll have the idea.)
As you can see, some spurious [url][/url] BBCodes are being inserted when this mod is installed.
Thanks Jon, got a fix for that, will be in the next release.
Great! Thanks, kelvincool.
I just put a new theme on the site and reinstalled mods. This is a new one for me but I cannot get it working. It is set to login/default.
If I select text in a post and use the bbc it comes up with a box showing the login option checked. I click 'apply' and it refreshes the page deleting the subject and does nothing. I can't post using it.
I do not know if this is related to Simple Portal , other mod, or theme.
Andy
What browser and version are you using?
Can you open up the browser console and see if there's anything there when you click the apply button?
PM your forum link, might be easier to debug that way.
Firefox 37.0.1 Linux Mint
Will check out the console later tonight and test a few other browsers. My forum link is in my signature.
Quote from: igirisjin on April 08, 2015, 06:30:33 AM
Firefox 37.0.1 Linux Mint
Worked fine when I tried it, I'm also on 37 but on Windows.
I tried with Chromium and Midori also but still not working. Only firefox seems to refresh a new post and delete the subject line.
Another mod or theme then perhaps. I uninstalled the ' hide using code tags' mod but still the same.
Quote from: kelvincool on April 04, 2015, 09:20:22 AM
Thanks Jon, got a fix for that, will be in the next release.
I don't mean to be impatient, but do you think that you'll be able to put out that next release soon, Kelvin? If not, would you mind posting some manual instructions here so that I could modify the code myself in the meantime?
Thanks again!
Display.php
$context['hc_current_post'] = $message;
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], array('hide'));
unset($context['hc_current_post']);
To
$context['hc_current_post'] = $message;
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
$modSettings['autoLinkUrls'] = "";
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], array('hide'));
$modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
unset($context['hc_current_post']);
I'm sure I'll need to change this in a number of other places too like the PMs page but this one should fix it on the post page.
Quote from: kelvincool on April 09, 2015, 06:34:39 PM
I'm sure I'll need to change this in a number of other places too like the PMs page but this one should fix it on the post page.
Awesome. Thank you!
Didn't mean to omit the unset($context['hc_current_post']); for the replacement. I've added it back into the post but just in case you missed it.
Quote from: kelvincool on April 09, 2015, 06:42:35 PM
Didn't mean to omit the unset($context['hc_current_post']); for the replacement. I've added it back into the post but just in case you missed it.
Thanks once again. :)
I'd just like to say thanks for creating this mod. It has made hiding content much easier!
Also, do you think you can add the option to hide content until users have replied to that specific topic?
Quote from: kill_seth on May 17, 2015, 11:33:05 AM
I'd just like to say thanks for creating this mod. It has made hiding content much easier!
Also, do you think you can add the option to hide content until users have replied to that specific topic?
I was wondering how long it would take for someone to ask this, the reason it is not currently included is because in my opinion it's a spam generator. If you can give me an example where it doesn't generate spam (one line posts that just say "thanks") then I will consider adding it in.
Quote from: kelvincool on May 17, 2015, 02:10:56 PM
I was wondering how long it would take for someone to ask this, the reason it is not currently included is because in my opinion it's a spam generator. If you can give me an example where it doesn't generate spam (one line posts that just say "thanks") then I will consider adding it in.
You got me on that one. I have links on my site which I'd like to hide from people until they at least give the thread a little love.
The old mod I was using had it, and it did generate a lot of spam posts. Although, a thanks post is better than none in my opinion.
1.1.4
- Fixed preview which wasn't working in 2.0.10
- Fixed auto URL bug
Can You update this mod to hide content for guest but not for crawler bot?
Doesn't that kind of defeat the purpose? All your hidden content will appear in search engines.
I suppose it's possible but there'll need to be some kind of mechanism to identify bots (headers or IP), both of which can be spoofed. I don't think this is something I'm going to implement but with the hooks in the mod it's possible for someone else to create a plugin to support it.
Please add support for hide post by captcha
Why would you want to hide by captcha? If you are already blocking bots from registering with captcha you can just hide by logged in.
I need to use solvemedia captcha only for guest so when anyone want to see post he should pass the captcha
Great mod! Thanks.
Only have one issue, when I click on BBC, there's no Pop-up window with "Hide content options". Instead this window, BBC add only code for itself in textarea:
[hide post=1 login=1][/hide]
I checked for errors and got this one:
Uncaught TypeError: Cannot set property 'hide' of undefined hidecontent.js?fin20:20
hidecontent.js:
oEditorHandle_message.oSmfExec.hide = 'hideOptions';
Any errors during installation?
What theme are you using?
What browser are you using?
Can you see references to "oEditorHandle_message" when you view the source of the page?
Mind sharing a link to the forum?
Oh dude. I'm so sorry. I forgot that I'm using 2.1 SMF.
Great news for you: your mod almost perfectly working in future SMF version. I got only 2 errors in install, but there's no big deal. Mod can't find <br> (in 2.1 they use </ br> instead).
If you still interesting to figure out whats wrong in 2.1 I can send you a link to forum in PM.
Anyway, thanks for effort.
The javascript has changed a fair bit in 2.1, there's no chance it's going to work without some major tweaking and I don't plan on doing that until 2.1 is stable.
Thanks for reply!
What permission is required to view content by default without needing to be selected? For example if I don't want a forum mod to see it is that possible? As it seems I only select Admin to view yet they can still see.
As I understand the moderate board permission gives default to override and view any hidden content, is there a way to make a separate permission?
Hello,
I have a little issue, hope someone can help.
I have installed the mod, but since it is lacking some options I was looking for, I uninstalled it.
However, all my links are still replaced by the "You are not allowed to view links" message.
I have re-installed it just in case, re-uninstalled, checked "erase all mod data" but still the same issue.
Also tried to disable to all forum, and tried all combination of checkboxes, but didnt worked either.
Deleted all browser cache aswell, tried with firefox, chrome and IE.
Running SMF v2.0.11
Does someone have any idea how I could fix that ?
Thanks
Parse the mod install instructions:
http://custom.simplemachines.org/mods/index.php?mod=4013
Manually edit the files and do the opposite of the instructions there.
Also, did you uninstall the mod even though it said errors were present?
Thanks for your answer.
I don't have any error. I can install and uninstall perfectly.
I did check all the modified files, and none of them has now the added code from the mod.
It is really weird lol
Any other thoughts ?
edit: found it !
There was still this code remaining in Sources/Subs.php
// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a> ' . $txt['txt_reg_links_or'] . ' <a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}
// End Registered Links
Quote from: Elizabeth II on January 02, 2016, 12:26:29 PM
As I understand the moderate board permission gives default to override and view any hidden content, is there a way to make a separate permission?
I can reduce it down to "modify posts" permission instead if that helps.
Kortal, I think you have the wrong topic, the mod that's causing your issues is registered links (http://custom.simplemachines.org/mods/index.php?mod=342)
Yeah, sorry kelvincool for the trouble. I figured this out later...
Thanks for your answer !
Quote from: kelvincool on January 04, 2016, 04:20:31 PM
Quote from: Elizabeth II on January 02, 2016, 12:26:29 PM
As I understand the moderate board permission gives default to override and view any hidden content, is there a way to make a separate permission?
I can reduce it down to "modify posts" permission instead if that helps.
Kortal, I think you have the wrong topic, the mod that's causing your issues is registered links (http://custom.simplemachines.org/mods/index.php?mod=342)
I think it would only work for me if it was a separate permission entirely as I wouldn't wish Forum Mods to be able to see hidden content they can view because they have modify powers.
Surely it makes perfect sense that if they can modify the post they can view its contents. What would happen if they modify a post that has hidden content they cannot see, the hidden content will basically disappear when they save.
Quote from: kelvincool on January 06, 2016, 01:18:01 PM
Surely it makes perfect sense that if they can modify the post they can view its contents. What would happen if they modify a post that has hidden content they cannot see, the hidden content will basically disappear when they save.
In that case couldn't it show like if you quote hidden content?
It could do that but then you'll lose your hidden content as soon as you saved the post. The saving process does not care about what's in the post, only what's in the text box when you save, sure you could write some crazy regex to parse out hidden content and evaluate it but it's not worth doing imo.
nice mod but i only mis the hide content and after post message to show could you do that to?
Quote from: phpshiva on January 19, 2016, 04:42:02 AM
nice mod but i only mis the hide content and after post message to show could you do that to?
This has been asked before, the question I always ask is: can you justify the spam it generates? My suggestion is always to use the say thanks mod in conjunction with this so you don't generate that spam of one word posts just to see the content.
Hello,
I installed the mod hide content and say thanks and everything went well,
the problem I have is this:
if I log in as admin I see the tag button hide when I create new topic
if instead
I enter as a normal user does not see the tag button Hide while I create topic
I checked the permissions and hide content is checked appropriately.
Can anyone help me please? how can I fix this situation?
Use smf 2.0.11 with EZPortal
if it were possible from php code? you should be okay
regards
Are you using different permission profiles for different boards?
Can you post screenshot of your permissions and the groups you have?
Anything in the error log?
Have you got any other groups that you can try the permission on?
you're right I had changed the categories allowed when I created ..
I solved :)
thank you very much and excuse the trouble !!!
regards
Just discovered an issue with this mod when trying to either copy or migrate a database.
As part of the installation values are added to the 'integrate_pre_include' variable in the settings table (eg, smf_settings) that include a long full path (eg, /home/website/public_html/forum/Sources/HideContent.php) instead of a short relative path (eg, $sourcedir/HideContent.php)
The added values that ideally should have relative paths are:
/home/website/public_html/forum/Sources/HideContent.php
/home/website/public_html/forum/Sources/HidePost.php
/home/website/public_html/forum/Sources/HideLogin.php
/home/website/public_html/forum/Sources/HideGroup.php
/home/website/public_html/forum/Sources/HideKarma.php
SELECT mg.id_group, mg.group_name
FROM {db_prefix}membergroups mg',
And all who don't need to see hidden groups ???
SELECT * FROM {db_prefix}membergroups
WHERE hidden = 0',
This is how only public groups will be visible
hi I installed the mod SayThanks_1.3.6 and the mod HideContent_1.1.4
the mod say thanks I add at the top right of each post a button to thank and it works, but when in the content of the message I use the "hide" function on the content
anyone who clicks thanks at the top, remains loading forever .. what is it due to?
only by updating the page does the content in the hide show otherwise no
i'm using smf 2.0.17
the mod works in part there must be something that blocks the execution of the thanks and in the various tests when there is no "hide" code it works regularly
I note this though:
in the install.xml file it only gives me to add codes before and after
but when i try to uninstall the mod it gives me this
code(search):
$context['hc_current_post'] = $row;
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
$modSettings['autoLinkUrls'] = "";
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg'], array('hide'));
$modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
unset($context['hc_current_post']);
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg']);
replace:
$context['message']['body'] = parse_bbc($context['message']['body'], $row['smileys_enabled'], $row['id_msg']);
in fact in the code I have this:
a double string equal correct?
$context['hc_current_post'] = "preview";
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
$modSettings['autoLinkUrls'] = "";
$context['preview_message'] = parse_bbc($context['preview_message'], (isset($_REQUEST['ns']) ? 0 : 1), '', array('hide'));
$modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
unset($context['hc_current_post']);
$context['preview_message'] = parse_bbc($context['preview_message'], isset($_REQUEST['ns']) ? 0 : 1);
so the code added, did not replace
and in the smf logs comes out this:
Call to undefined function template_hidecontent_wrapper(
and add this error:
File:/******/Sources/SayThanks.php
Errore: 2: offset stringa non valido 'id_msg'
URL: ?azione:post2;scheda-13;anteprima;xml
hi,
i know its old, but im running the WYSIWYG Editor from smfpacks, how to add the BBC Button to their editor as well ?
is there a way ?
thank you
ok it seems it doesnt work at all....
deinstalled the WYSIWYG Editor....and mmh..... i can see it, and theres no code inserted at all....
bug ? problem ?
(runnning 2.0.17)
or does anyone how to get it worked, i just want it, that only registered users can read the topic, and the text need em to do an register to the forum.....
best regards
andi
or can say anyone what i have to edit in the other Editor ? which files, noone uses this mod with the WYSIWYG Editor ? :/
or is it possible to make a master switch for hide all content for unregistered, except certain boards ? or can i make this setting without the BBCode ? or where would i edit/set it ?(which file ?)
Nothing in the error log of your administrative panel? What version of PHP does your hosting work?
Regards!
Thank you for the cool mod. But unfortunately, I also have errors. One of them is critical.
https:/XXXX/index.php?action=admin;area=logs;sa=errorlog;descApply
: Undefined index: hidecontent_settings
Apply Filter: Only show the errors from this file
File: /home/wwwroot/xxx/Sources/HideContent.php
Line: 153
Type of error: Critical
Apply Filter: Only show the error messages of this URL
https://xxxxx/index.php?action=admin;area=modsettings;sa=hidecontent
Apply Filter: Only show the errors with the same message
Call to undefined function ModifyHideContentSettings()
SMF 2.0.17 PHP 7.2.33 NGINX
Thank you in advance!
I also have a problem with this mod, but in my opinion it's useless to write on this thread, we won't have support for this mod.
kevincool last logged in on July 29 , 2018, 11:26:48 am
damage :(
That and the fact I have yet to see a *good* reason to use it.
for nothing to hide from you I have a forum for sharing and mutual aid and I have many people who make available different kinds of sharing to our members, free of charge. And they'd like a minimum of feedback.... a "thank you" for what they have made available, hence the usefulness of this mod related to the thanks mod.
After I also start from a principle which is, that we are not here to reeducate people and that if they have not learned politeness, it is not up to us to do so.
But those who make it available on my forum, swear by this "hide" and urge me to reactivate it.
This mod was my last chance to please them.
Is this a "good" reason?
I hope so...
Unless you or someone else wants to take over and take care of this mod... I'm in a bad way and will have to do without it.
Translated with www.DeepL.com/Translator (free version)
Quote from: grandseb59
I also have a problem with this mod, ...
Explain your problem - let's see what we can do to help.
Thank you for your interest in my problem.
In the Mod "hide content" configuration:
I just "activate the mod: thank" value: 1
and defined the sections where it would be applicable and the groups that will escape this mod (the staff).
when a member (non-staff) arriving on a page where the text is hidden using the hide thank=1 and /hide tags (between brackets of course).
he comes across this:
(https://i.postimg.cc/C1v0CHh6/hide1.png)
and if he clicks on "thank" or if he reply to the topic, the text remains hidden with this error message.
plop?
There's two problems, you've changed the wording on that template and broken it by changing {thanks_needed} to {thanks_need}.
Secondly you've misunderstood the feature, the hide by thanks count one is about hiding the content based on how many thanks the user viewing the contents has, that's why thanking the post does nothing because it's about how many times you yourself as the user has been thanked. The one you are looking for is the thanked feature which you can enable in the config. That one will only show content if the user thanks the post.
I would not recommend using this mod as you can see it's not supported at all.
Quote from: kelvincool on October 16, 2020, 02:10:48 PM
I would not recommend using this mod as you can see it's not supported at all.
ok ;)
Hi!
I've installed this mod on 2.0.18. It gave mi this error
Call to undefined function create_function()
and blocked entire forum. It was unblocked when removed HideContent.php file from Sources.
I'm running PHP 8.0, so when I change it back to 7.4 and uploaded back HideContent.php everything works great, no errors.
Is it possible to make this file work on php 8.0?
Quote from: AstroBilly on April 18, 2021, 05:13:24 AM
Hi!
I've installed this mod on 2.0.18. It gave mi this error
Call to undefined function create_function()
and blocked entire forum. It was unblocked when removed HideContent.php file from Sources.
I'm running PHP 8.0, so when I change it back to 7.4 and uploaded back HideContent.php everything works great, no errors.
Is it possible to make this file work on php 8.0?
please note that smf 2.0.18 is not made to work with php8, the highest php that it is made to work with is 7.4
as for this mod, I am not sure what the php level is for it, more than likely 7.2
I have updated this mod to be compatible with SMF 2.1.1 now and also made it hooks only.
Thanks
@kelvincoolTurkish translation
hello, i installed this mod, but when i go into new thread it gives me error 500 page not found.
(https://i.postimg.cc/43kygpwn/Immagine-2022-11-17-095415.png)
(https://i.postimg.cc/s2YXD10m/Immagine-2022-11-17-095456.png)
please a solution
Thanks for your attention
php8
tema : boru rc4
Which version of SMF is that? You sure that error is related? It looks like it's from the profile page rather than starting a new thread page, don't think the mod does anything on the profile page.
Does the error go away after you uninstall the mod?
It would help if you can upload the Profile.template.php file so I can see which line that error is referring to.
What other mods you got installed?
Hello, I would like to report an error, my English is not very good, I am using Google translator, I will leave the original text below.
The error: I am using this mod together with Say Thanks, configuring so that when saying thank you the hidden content is unlocked, the error is that it shows the configuration menu only when using the NO WYSIWYG mode, that is, if I activate the WYSIWYG editor by default, the mod adds this tag [hide group=1]hello[/hide] without letting me choose from the menu.
Example:
(https://i.imgur.com/J2L8TZG.png)
Original text:
Hola, quisiera reportar un error, mi ingles no es muy bueno estoy usando google traductor, voy a dejar el texto original abajo.
El error: Estoy utilizando este mod junto al Say Thanks, configurando para que al dar las gracias se desbloque el contenido oculto, el error que tiene es que muestra el menú de configuración solamente al usar el modo NO WYSIWYG, es decir, si activo el editor WYSIWYG por defecto, el mod agrega esta etiqueta [hide group=1]hola[/hide] sin dejarme elegir desde el menú.
Hello
@Matias- I have released version 2.1.1 which should fix this issue.
Looking at your description, this isn't really intended to be a spoiler mod but a much more extensive way of hiding post content, yes?
Yes
@Steve, this is very much different to a spoiler mod, the content is only visible once specified criteria is met.
Thanks Kelvin. :)
Quote from: kelvincool on February 05, 2023, 01:31:49 PMHello @Matias-
I have released version 2.1.1 which should fix this issue.
Thanks! Now everything works correctly.
Hello I discovered a bug.
When using the hide function with the administrator user everything works perfectly, but when using it in regular users, it works badly.
The malfunction is due to the fact that if the user hides a piece of content, that same user sees that content hidden (and since he cannot give thanks to himself) he cannot view it... Any way to fix it?
----
I add, I don't know if this is configured like this on purpose or not, but administrators can see all hidden content without having to say thank you.
For 2, it might be better if admins can moderate the content without extra steps
@Matias-, these are mentioned in the readme
QuoteAdditional 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.
I might revisit the original poster being able to see their own hidden content. I can't remember exactly why that was difficult.
Quote from: kelvincool on February 13, 2023, 05:28:08 AM@Matias-, these are mentioned in the readme
QuoteAdditional 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.
I might revisit the original poster being able to see their own hidden content. I can't remember exactly why that was difficult.
I understand.
But the problem is that regular users can't see their own hidden content because they have to thank themselves.
In other words they must give thanks to themselves and that is not possible... Therefore the only way to see their content is to "edit" the post, but it is impractical.
Hello, I have to report another bug besides the one I mentioned above.
When a user thanks in a post that he has more than 1 [hide] he only unlocks 1 content, not all. I leave an example image.
(https://i.imgur.com/7i7A51J.png)
The other error, as I already said, is that the post auto cannot see its own hides since the system asks it to say "thank you" but it cannot thank itself.
Thanks for reporting that above bug
@Matias-, that bug as well as the other issue you mentioned should be fixed in the new release:
Hide Content v2.2.0 and Say Thanks v2.4.3
Quote from: kelvincool on February 16, 2023, 06:16:49 PMThanks for reporting that above bug @Matias-, that bug as well as the other issue you mentioned should be fixed in the new release:
Hide Content v2.2.0 and Say Thanks v2.4.3
Thanks bro!!
Now everything works correctly.
Hello, after trying the mod for a few days I find that everything works ok, but it generates an error -I don't know for what reason- in the administration log, I leave it just in case.
(https://i.imgur.com/vB4s8zU.png)
v2.2.1 will fix that error.
Hello,
Thanks a lot
@kelvincool for your hide mod!
Let me write some suggestions for improvement:
1. Please add to `Hide Content` (without forcing `Say Thanks`) the `like` parameter for the `hide` tag.
To be able to close content like this:
[hide like] content will be visible only after clicking on the `like` button [/hide]
(https://i.imgur.com/eMjXGcH.png)
2. Add a feature so that the `hide` tag with no options will hide the content from guests/unauthorized guests.
For example like this:
[hide] content is visible to everyone except guests and unauthorized people [/hide]
Currently, the tag without parameters displays a green background, but the content is available to everyone and guests.
Perhaps this is an unnecessary desire and it is enough for me to change `[hide]` to `[hide post=1]` in the database - in this case, please tell me the mysql query for replacement.
A backup of the database will definitely be made in advance :)
I can look at the like option, not promising anything since it could be quite tricky as it's an ajax trigger and ideally the hidden content should be shown straight away much like the way the Say Thanks one works.
There is already an option for hiding content from guests. Just enable the hide by login plugin.
Hello good
Currently I have these problems with Hide Content, any solution?
@KeyFinder check if the language file is in the themes folder.
Should be in this location \Themes\default\languages\HideContent.english.php
If it's not there, try uninstalling and reinstalling.
Quote from: kelvincool on August 10, 2023, 03:22:05 PM@KeyFinder check if the language file is in the themes folder.
Should be in this location \Themes\default\languages\HideContent.english.php
If it's not there, try uninstalling and reinstalling.
@kelvincool The file is in that directory, I also tried uninstalling and installing again but the problem persists...
@KeyFinder I've managed to replicate the issue and this has been fixed now in version 2.2.2
Quote from: kelvincool on August 11, 2023, 06:06:26 PM@KeyFinder I've managed to replicate the issue and this has been fixed now in version 2.2.2
After installing the new update, I had no problems with logs... Thank you for your time
Greetings!
v2.3.0 released
- Hide by liked plugin now available
Pulling this release for now, I forgot to do something.
v2.3.0 has be released (again)
When updating to the latest version, I always get the following error
Could you leave version 2.2.2? That didn't give me errors
This looks like it's coming from preview post unlike last time when it was to do with alert notifications, I can't replicate it this time, do you get that error for any of the other plugins? Also can you see any more detail on that error?
Can you check if these lines are in the language file?
$txt['hidelike_title'] = 'Hide by liked';
$txt['hidelike_text'] = 'You must like this post to see the content.';
$txt['hidelike_desc'] = 'Hides post content based on like.';
I've uploaded 2.2.2 again.
Quote from: kelvincool on August 28, 2023, 05:27:10 AMThis looks like it's coming from preview post unlike last time when it was to do with alert notifications, I can't replicate it this time, do you get that error for any of the other plugins? Also can you see any more detail on that error?
Can you check if these lines are in the language file?
$txt['hidelike_title'] = 'Hide by liked';
$txt['hidelike_text'] = 'You must like this post to see the content.';
$txt['hidelike_desc'] = 'Hides post content based on like.';
I've uploaded 2.2.2 again.
These lines are found correctly in the language file...
Hmm very strange, the only idea I've come up with is the clear the cache (if you even have it turned on), the language files get cached so perhaps it cached the old version without those new lines. You can do so in Admin->Maintenance->Server settings->Caching->Empty SMF's cache
Is it just the hidelike ones that you see errors for? Not the other ones like hidelogin, etc...?
Hello, possibile solution for this problem im using 2.1.4 SMF, wiht enabled Hide Content my links look like this..
(https://i.ibb.co/wNB3Xm1/Links.jpg) (https://ibb.co/XZjNgRT)
Tnx,Best regards.
Does it happen without the other tags?
Yes there is no other tags, code looks like this...
[hide post=1 liked=1]https://mega.nz/file/R2o3nYJC#8pOJodojTmuPJo8txd1BRzZAGLS2QSpSc1A79FoJG7
[/hide]
@Electrobox I've tried to replicate that on my local 2.1.4 and it works as expected, I suspect it's styling issue related to how the theme displays code tags inside infoboxes. What theme are you using?
I can see you are using code tags, try it without the code tags and see what that looks like.
Im using default SMF theme.
public_html/Themes/default
That's strange then if it's happening on default theme as I'm using that too.
Like I said try it without the code tags.
Is this website live? Got a link with an example? The only way to really debug it is to inspect the css on those code tags.
Website is live, I sent you a private message with access data. Tnx
Hi, I installed this mod, it works but I get a lot of errors like this:
/home/ddcrewne/public_html/forum/Sources/Load.php (Linea 2876)2: filemtime(): stat failed for /home/ddcrewne/public_html/forum/Themes/Halloween/css/hidecontent.css
Tipo di errore
Cron
Messaggio di errore
2: filemtime(): stat failed for /home/ddcrewne/public_html/forum/Themes/Halloween/css/hidecontent.css
File
/home/ddcrewne/public_html/forum/Sources/Load.php
Linea
2876
URL della pagina che ha causato l'errore
https://dd-crew.net/forum/index.phphttps://dd-crew.net/forum/cron.php
Informazioni di backtrace
#0: smf_error_handler_cron()
Chiamata da sconosciuto nella linea -1
#1: filemtime()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Load.php nella linea 2876
#2: loadCSSFile()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Load.php nella linea 2743
#3: loadTemplate()
Chiamata da /home/ddcrewne/public_html/forum/Sources/HideContent.php nella linea 40
#4: integrateBbcCodes()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Subs.php nella linea 5787
#5: call_integration_hook()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Subs.php nella linea 2480
#6: parse_bbc()
Chiamata da /home/ddcrewne/public_html/forum/Sources/tasks/CreatePost-Notify.php nella linea 561
#7: handleWatchedNotifications()
Chiamata da /home/ddcrewne/public_html/forum/Sources/tasks/CreatePost-Notify.php nella linea 270
#8: execute()
Chiamata da /home/ddcrewne/public_html/forum/cron.php nella linea 249
#9: perform_task()
Chiamata da /home/ddcrewne/public_html/forum/cron.php nella linea 131
How can I solve it?
Thank you
Hi, please try v2.3.1 that I have just released, it should resolve this issue.
The cause of this issue is related to how smf sends notifications/alerts, the job that runs the tasks have been moved to cron.php since 2.1.4 (see https://github.com/SimpleMachines/SMF/issues/7696). I loaded my templates in integrate_bbc_codes hook (can't remember why I needed to do this but doesn't seem necessary anymore), the loadTemplate function loads the css and this causes the filemtime(): stat failed error, normally in the code that error is suppressed with the @ sign but because cron.php sets its own error handler the error is no longer suppressed.
@live627 might be interested to know about this issue as it affects his message boxes mod and not
@Diego Andrés mod, you posted in the wrong support thread which was quite confusing.
loadTemplate probably shouldn't load CSS at all if it's coming from cron.
(Also, the job that runs the tasks long since predates 2.1.4. I added it when it was still 2.1 alpha more than 10 years ago.)
I installed the update yesterday and, so far, no errors related to the mod, so I can say that the problem has been solved ;)
Thank you
I come back here to understand what's going on with this mod...
After installing the latest version, the SMF error log no longer records any errors, it works fine and I have no problems.
However, I realized in recent days that this mod is generating a lot of errors in the error_log in the FTP directory and the error is the following:
[28-Feb-2024 21:01:38 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function template_hidecontent_error_wrapper() in /home/ddcrewne/public_html/forum/Sources/HideContent.php:505
Stack traces:
#0 /home/ddcrewne/public_html/forum/Sources/HideContent.php(73): HideContent->evaluateConditions()
#1 /home/ddcrewne/public_html/forum/Sources/Subs.php(3643): HideContent->{closure}()
#2 /home/ddcrewne/public_html/forum/Sources/tasks/CreatePost-Notify.php(561): parse_bbc()
#3 /home/ddcrewne/public_html/forum/Sources/tasks/CreatePost-Notify.php(270): CreatePost_Notify_Background->handleWatchedNotifications()
#4 /home/ddcrewne/public_html/forum/cron.php(249): CreatePost_Notify_Background->execute()
#5 /home/ddcrewne/public_html/forum/cron.php(131): perform_task()
#6 {main}
thrown in /home/ddcrewne/public_html/forum/Sources/HideContent.php on line 505
This is only the latest one recorded, but there are a lot of them, maybe around 14000, but none in the SMF error log, only in the error_log in FTP.
Should I worry or is it a minor error?
Thank you
@Lucarella I've managed to replicate that, bit surprised they did not go into the smf log but I have released the fix v2.3.2.
Thanks
@kelvincool for your help. Yesterday I installed the new update and the errors stopped, from last night to today none have appeared
The only strange thing I noticed was that immediately after installing the mod, the following errors appeared in the SMF error log:
https://dd-crew.net/forum/cron.php
/home/ddcrewne/public_html/forum/Sources/Load.php (Linea 2876)
Tipo di errore: Manutenzioni programmate
Messaggio di erroreSeleziona
2: filemtime(): stat failed for /home/ddcrewne/public_html/forum/Themes/Halloween/css/spoiler.css
https://dd-crew.net/forum/cron.php
/home/ddcrewne/public_html/forum/Sources/Subs.php (Linea 5787)
Tipo di errore: Manutenzioni programmate
Messaggio di erroreSeleziona
2: SayThanks::integratePreJavascriptOutput(): Argument #1 ($do_deferred) must be passed by reference, value given
I don't know if it's because of this update, but then there weren't any, just these and that's it and related to a single user and both the say thanks and the spoiler function without problems
Maybe a coincidence?
I replicated those errors and they happen when someone exports their profile data, a very rare occurrence so you won't see them very often.
Not sure about the first one but I also got that error and for index.css as well. Seems similar to the earlier css issue.
It looks like the root cause of the second error is an SMF bug in profile export.
All in all I don't think you have to worry about these errors.
In fact I'm not worried, also because I haven't seen them again.
Thank's for your job
Hi kelvincool,
I'm sorry that lately you've been working just for me, but maybe I have a new problem with the hide mod.
As you can see from the image, when you cite a post that contains a non-hidden ed2k link, the ed2k links appear in the citation together with the html tags (which we do not insert with the links) and the link to the file statistics site.
(https://i.postimg.cc/V0tzdTZs/Screen-Shot-03-16-24-at-01-57-PM.png) (https://postimg.cc/V0tzdTZs)
I say that the problem is caused by the hide mod because, to understand what it was, I started uninstalling the mods I have one at a time and, right after removing the hide mod, the problem disappeared and the quotes are perfect.
The mod for ed2k links is this: Ed2k Autolinker (https://custom.simplemachines.org/index.php?mod=4386)
It's not a very big problem, also because quotes with ed2k links inside are not common, so if it can be solved, ok, otherwise never mind...
Thank you
@Lucarella I've been thinking about this problem this past week, unfortunately I think it's a case of the 2 mods do not work well together.
it's just to hide the content, not the attached files
(https://i.postimg.cc/xCzXZrqD/Screenshot-2.png)
I installed the mod successfully.
I want to set that visitors (not registered members) cannot see the hide content while everyone else can. How do I set it up?
I've been trying half an hour.
See screenshot of the option to enable and check as default.
I'm having 1 simple problem with this mod but no idea why.
I only want to use it to hide links but every time I set it and put a link in the hide tag the like option isn't in the post.
Quote from: lord alibaski on December 30, 2024, 06:26:09 PMI'm having 1 simple problem with this mod but no idea why.
I only want to use it to hide links but every time I set it and put a link in the hide tag the like option isn't in the post.
Can you go into more detail about what you are doing and the eventual output in the post? Screenshots, videos would be helpful to see where you are going wrong. Have you enabled the like option in the mod settings?
Yeah sorry I meant to get back to this but forgot. I will put more detailed info later on the problems I was having. I had to uninstall it because it just wouldn't work.
@kelvincool Thanks for getting back to me on this it's much appreciated.
I won't put any screenshots up mate no need because I got it working in the end though.
Will start by telling you I wanted to try this modification so I could hide links but it didn't work as I thought it would.
Main issue with it when I got it working was, I wanted to know who liked the post so I could see who actually downloaded the link. Though once someone clicked on like post to view the link all they had to do was click on like post again and this removed that person from the like post notification box so I had no idea who had downloaded the link.
Is there anyway of stopping people from clicking the like post again so it stops them from removing themselves from liking the post.
What point does it actually serve for people to click the like button? It's not sincerely "liking" the content, because everyone knows it's just a thing you have to do to get the content.
If the goal is to prevent guests getting it, don't show it to guests, only authenticated users.
If the goal is to see who downloaded it, firstly why does that matter? Or if it does matter, maybe https://custom.simplemachines.org/index.php?mod=4146 (there looks to be a 2.1 version on GitHub, but the mod thread may well have more details)
@lord alibaski You could remove the unlike option from the template I suppose. Another option is to use my other mod Say Thanks (https://custom.simplemachines.org/index.php?mod=3898) which you can disable unthanking.
Quote from: kelvincool on January 04, 2025, 05:47:46 AMYou could remove the unlike option from the template I suppose. Another option is to use my other mod Say Thanks (https://custom.simplemachines.org/index.php?mod=3898) which you can disable unthanking.
The stock likes feature does stuff with AJAX, though and removing it from the template is suddenly a whole lot harder.
The forum I run is hidden anyway so no need to worry about guest looking at links, we just have a few ignorant members who just grab without saying thank you bit stupid when the links we use can detect who is downloading it via IP.
We used to use the hide tag special (https://www.simplemachines.org/community/index.php?topic=32954.0) mod years ago this was the best one but it's not been updated in years would like to have something like this back on smf.
@kelvincool I looked at the say thanks mod but it doesn't really do what is needed but thanks anyway.
Maybe we have the same type of forum and I use hide content with say thank and everything works fine. The links are visible only after thanking.
It seems to me that in addition to the thanker, the links (or whatever content you want to hide) also appear if the user inserts a post to the topic, but I don't remember well.
The only problem comes from the spoiler that must not be customized, it must be left by default, that is like this
[spoiler][/spoiler]
and not like this, otherwise the links do not appear even after clicking on the thank you
[spoiler=YOUR TEXT][/spoiler]
@Lucarella No idea how your getting this to work with both modifications installed.
I have tried both installed but when I have them both installed the say thank you option isn't there?
(https://i.postimg.cc/xCxKLswW/mods-installed.png)
(https://i.postimg.cc/x8NbM9yz/both-installed-2.png)
(https://i.postimg.cc/2SQh08pd/installed-both-mods.png)
How have you got this set up inside modifications.
Thanks
I sent you a PM with the settings I use
EDIT
It's normal for the thanks button not to appear in your own posts, but only in other people's posts.
Cheers Lucarella will check when I'm back on my PC later.
Those pics one was taking with me being admin the other was taken again with a test account with normal permissions.
Hopefully your settings will fix the problem I am seeing.
Thank you
Update those settings worked perfect Lucarella much appreciated for that. I know why it didn't work last time I tried it I uninstalled the hide content mod for some strange reason and didn't notice when I took the screenshot.
Many thanks for your help.
Hi, tonight I realized that I and a friend of mine on another forum have this problem:
https://www.simplemachines.org/community/index.php?topic=588394.msg4170984#msg4170984
I uninstalled the hide content mod (2.3.2) and everything went back to normal, so the problem is caused by the mod.
Even if it's not a serious problem, is there a way to solve it?
Thanks
@Lucarella I have released v2.3.3 that addresses this issue.
Thanks, now the problem is gone ;)
@kelvincool there is also an error when quoting links, the
urls that are part of a message that includes HTML are distorted by new code that is added.
Original code:<div class="ryehead" style="background: url(https://i.imgur.com/SJxuWKG.jpeg);">
<img src="https://i.imgur.com/zhas9VU.jpeg" width="120px">
<div class="ryetitulo">Viejos hábitos
<span style="font-size: 10px;"><a href="https://harrypotterhead.com/foro">Club de duelos</a></span></div></div>
Code when quoting<div class="ryehead" style="background: url([url="https://i.imgur.com/SJxuWKG.jpeg);"]https://i.imgur.com/SJxuWKG.jpeg);[/url]">
<img src="[url="https://i.imgur.com/zhas9VU.jpeg"]https://i.imgur.com/zhas9VU.jpeg[/url]" width="120px">
<div class="ryetitulo">Viejos hábitos
<span style="font-size: 10px;"><a href="[url="https://harrypotterhead.com/foro/"]https://harrypotterhead.com/foro/[/url]/foro/index.php">Club de duelos</a></span></div></div>
When I uninstall the mod it works correctly when quoting, so it's definitely a mod issue