Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: kelvincool on January 03, 2015, 11:08:17 PM

Title: Hide Content
Post by: kelvincool on January 03, 2015, 11:08:17 PM
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.

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:

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 (http://custom.simplemachines.org/mods/index.php?mod=3898) now supports this mod.

Additional Notes and known limitations


Translation Credits
Turkish - gevv

Resource Credits

Hidden 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/

Support

Support 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)
Title: Re: Hide Content
Post by: Arantor on January 03, 2015, 11:11:44 PM
Doesn't seem to account for SSI or RSS feeds?
Title: Re: Hide Content
Post by: kelvincool on January 04, 2015, 06:57:28 AM
Thanks Arantor, been a long time since I've touched SSI.

Put out a new version to support both of these.
Title: Re: Hide Content
Post by: langel on January 04, 2015, 05:10:06 PM
Awesome mod!! Thanks for sharing it!

@kelvincool Great work +10
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 11:25:36 AM
hi, set of modes, but there was a problem with Quote Posts
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 12:04:06 PM
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.
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 12:17:50 PM
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
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 12:30:42 PM
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?
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 12:39:02 PM
Writing through the Google translator :)

quoting the text does not work.

A feeling that is conflicting jQuery library

Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 12:51:13 PM
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
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 01:01:31 PM
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:
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 01:06:21 PM
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
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 01:15:24 PM
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.
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 01:26:02 PM
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
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 01:47:52 PM
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?
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 01:59:32 PM
I tested on: Chrome 39, firefox 34, IE 11.

Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 02:04:27 PM
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
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 02:14:31 PM
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.
Title: Re: Hide Content
Post by: motosimak on January 11, 2015, 02:24:34 PM
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.
Title: Re: Hide Content
Post by: kelvincool on January 11, 2015, 05:54:51 PM
New version released.

1.1
Title: Re: Hide Content
Post by: motosimak on January 12, 2015, 04:43:26 AM
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

Title: Re: Hide Content
Post by: kelvincool on January 12, 2015, 01:56:35 PM
I will look into that for the next release, you need over 20 groups to cause that issue.
Title: Re: Hide Content
Post by: motosimak on January 13, 2015, 04:25:28 AM
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/)
Title: Re: Hide Content
Post by: kelvincool on January 13, 2015, 12:53:29 PM
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.
Title: Re: Hide Content
Post by: motosimak on January 26, 2015, 01:23:01 PM
You can add ?:
1. hide time user registration
2. hide for a particular nick or more nicknames separated by commas
Title: Re: Hide Content
Post by: kelvincool on January 28, 2015, 06:40:19 PM
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?
Title: Re: Hide Content
Post by: 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
Title: Re: Hide Content
Post by: NekoJonez on January 30, 2015, 08:31:48 AM
Can you hide by rank? Like only mods or admins can see it?
Title: Re: Hide Content
Post by: kelvincool on January 31, 2015, 04:58:28 PM
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.
Title: Re: Hide Content
Post by: desiamerican26 on February 13, 2015, 08:31:30 PM
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
Title: Re: Hide Content
Post by: tranhiep_116 on February 13, 2015, 10:57:58 PM
i can't install this mod  :o
Title: Re: Hide Content
Post by: Burke ♞ Knight on February 13, 2015, 11:29:52 PM
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)
Title: Re: Hide Content
Post by: desiamerican26 on February 14, 2015, 09:46:35 AM
Any Help Anyone?
Title: Re: Hide Content
Post by: 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 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.
Title: Re: Hide Content
Post by: desiamerican26 on February 14, 2015, 09:58:21 AM
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
Title: Re: Hide Content
Post by: desiamerican26 on February 14, 2015, 10:49:04 PM
Hi Kelvin,

Please update me on this if you come up with the update.

Thank You
Regards,
Nikhil
Title: Re: Hide Content
Post by: kelvincool on February 15, 2015, 12:37:35 PM
New version released.

1.1.1

I ended up going with level 1, level 2 would require another query which I didn't want to do
Title: Re: Hide Content
Post by: desiamerican26 on February 15, 2015, 01:24:25 PM
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
Title: Re: Hide Content
Post by: kelvincool on February 15, 2015, 03:51:53 PM
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.
Title: Re: Hide Content
Post by: desiamerican26 on February 15, 2015, 05:22:37 PM
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
Title: Re: Hide Content
Post by: kelvincool on February 15, 2015, 05:53:04 PM
1.1.2

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.
Title: Re: Hide Content
Post by: desiamerican26 on February 16, 2015, 09:14:11 PM
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
Title: Re: Hide Content
Post by: kelvincool on February 17, 2015, 05:14:33 AM
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.
Title: Re: Hide Content
Post by: desiamerican26 on February 17, 2015, 07:28:19 PM
Hi Kelvin,

Please Check you pm. My site: www.desi-american.com

Thank You
Regards,
Nikhil
Title: Re: Hide Content
Post by: kelvincool on February 17, 2015, 08:19:02 PM
Hi Nikhil,

Can you update the mod to the latest one? 1.1.2
Title: Re: Hide Content
Post by: desiamerican26 on February 17, 2015, 08:32:45 PM
Give me few Minutes. I will do it right now.
Title: Re: Hide Content
Post by: desiamerican26 on February 17, 2015, 08:39:16 PM
Hi  Kelvin,

I updated with the new one. Please check.
Title: Re: Hide Content
Post by: kelvincool on February 18, 2015, 07:12:48 PM
Looks like it's working fine now.  :)

The hide icon is missing though, guessing you forgot to apply the mod to your custom theme.
Title: Re: Hide Content
Post by: desiamerican26 on February 18, 2015, 09:22:13 PM
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
Title: Re: Hide Content
Post by: 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.
Title: Re: Hide Content
Post by: 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.
Title: Re: Hide Content
Post by: desiamerican26 on February 20, 2015, 08:49:39 PM
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
Title: Re: Hide Content
Post by: angsaysrawr on February 20, 2015, 09:32:42 PM
Thank you for the quick follow up. I'll wait for the new release. :)
Title: Re: Hide Content
Post by: 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
Title: Re: Hide Content
Post by: kelvincool on February 22, 2015, 11:18:33 AM
1.1.3

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.
Title: Re: Hide Content
Post by: kelvincool on February 22, 2015, 11:32:51 AM
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.
Title: Re: Hide Content
Post by: desiamerican26 on February 22, 2015, 12:15:49 PM
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?
Title: Re: Hide Content
Post by: kelvincool on February 22, 2015, 12:25:00 PM
Yes new version is 1.1.3.
Title: Re: Hide Content
Post by: desiamerican26 on February 22, 2015, 04:34:45 PM
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
Title: Re: Hide Content
Post by: kelvincool on February 22, 2015, 06:12:57 PM
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.
Title: Re: Hide Content
Post by: desiamerican26 on February 23, 2015, 08:10:47 PM
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
Title: Re: Hide Content
Post by: jsx 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?
Title: Re: Hide Content
Post by: kelvincool on March 01, 2015, 05:43:42 PM
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.
Title: Re: Hide Content
Post by: jsx on March 02, 2015, 06:29:40 AM
All right. :)
Title: Re: Hide Content
Post by: jsx 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.

----------------------

(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
Title: Re: Hide Content
Post by: kelvincool on March 10, 2015, 10:06:48 AM
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.
Title: Re: Hide Content
Post by: 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?
Title: Re: Hide Content
Post by: kelvincool on March 10, 2015, 02:49:49 PM
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
Title: Re: Hide Content
Post by: jsx on March 10, 2015, 02:50:33 PM
@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?
Title: Re: Hide Content
Post by: kelvincool on March 10, 2015, 03:04:14 PM
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.
Title: Re: Hide Content
Post by: motosimak on March 10, 2015, 03:13:28 PM
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
Title: Re: Hide Content
Post by: jsx on March 11, 2015, 09:33:11 AM
@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?
Title: Re: Hide Content
Post by: kelvincool on March 11, 2015, 11:22:02 AM
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.
Title: Re: Hide Content
Post by: jsx on March 12, 2015, 05:34:11 AM
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)
Title: Re: Hide Content
Post by: 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)?
Title: Re: Hide Content
Post by: SaltedWeb on March 24, 2015, 01:42:23 AM
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.
Title: Re: Hide Content
Post by: kelvincool on March 24, 2015, 05:29:22 PM
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!
Title: Re: Hide Content
Post by: Sesquipedalian on April 03, 2015, 12:26:45 AM
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.
Title: Re: Hide Content
Post by: kelvincool on April 04, 2015, 09:20:22 AM
Thanks Jon, got a fix for that, will be in the next release.
Title: Re: Hide Content
Post by: Sesquipedalian on April 04, 2015, 03:39:29 PM
Great! Thanks, kelvincool.
Title: Re: Hide Content
Post by: OCJ on April 07, 2015, 07:18:27 AM
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
Title: Re: Hide Content
Post by: kelvincool on April 07, 2015, 05:44:42 PM
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.
Title: Re: Hide Content
Post by: OCJ on April 08, 2015, 06:30:33 AM
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.
Title: Re: Hide Content
Post by: kelvincool on April 08, 2015, 02:00:24 PM
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.
Title: Re: Hide Content
Post by: OCJ on April 09, 2015, 04:10:10 AM
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.
Title: Re: Hide Content
Post by: Sesquipedalian on April 09, 2015, 04:43:27 PM
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!
Title: Re: Hide Content
Post by: kelvincool on April 09, 2015, 06:34:39 PM
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.
Title: Re: Hide Content
Post by: Sesquipedalian on April 09, 2015, 06:35:54 PM
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!
Title: Re: Hide Content
Post by: 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.
Title: Re: Hide Content
Post by: Sesquipedalian on April 09, 2015, 09:06:38 PM
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. :)
Title: Re: Hide Content
Post by: 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?
Title: Re: Hide Content
Post by: kelvincool on May 17, 2015, 02:10:56 PM
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.
Title: Re: Hide Content
Post by: kill_seth on May 17, 2015, 06:08:52 PM
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.
Title: Re: Hide Content
Post by: kelvincool on May 31, 2015, 04:33:42 PM
1.1.4
Title: Re: Hide Content
Post by: MESWEB on July 04, 2015, 11:46:44 AM
Can You update this mod to hide content for guest but not for crawler bot?
Title: Re: Hide Content
Post by: kelvincool on July 04, 2015, 04:00:59 PM
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.
Title: Re: Hide Content
Post by: waplist on September 22, 2015, 08:50:54 AM
Please add support for hide post by captcha
Title: Re: Hide Content
Post by: kelvincool on September 22, 2015, 12:30:35 PM
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.
Title: Re: Hide Content
Post by: waplist on September 22, 2015, 11:47:29 PM
I need to use solvemedia captcha only for guest so when anyone want to see post he should pass the captcha
Title: Re: Hide Content
Post by: Shkic on December 22, 2015, 02:56:52 PM
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';
Title: Re: Hide Content
Post by: kelvincool on December 22, 2015, 04:13:57 PM
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?
Title: Re: Hide Content
Post by: Shkic on December 22, 2015, 05:18:42 PM
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.
Title: Re: Hide Content
Post by: kelvincool on December 22, 2015, 06:06:03 PM
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.
Title: Re: Hide Content
Post by: Shkic on December 22, 2015, 06:18:28 PM
Thanks for reply!
Title: Re: Hide Content
Post by: Elizabeth II on January 02, 2016, 12:26:29 PM
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?
Title: Re: Hide Content
Post by: Kortal on January 03, 2016, 09:59:25 PM
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
Title: Re: Hide Content
Post by: Colin on January 04, 2016, 12:31:43 AM
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?
Title: Re: Hide Content
Post by: Kortal on January 04, 2016, 01:42:06 PM
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>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links

Title: Re: Hide Content
Post by: 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)
Title: Re: Hide Content
Post by: Kortal on January 04, 2016, 05:14:29 PM
Yeah, sorry kelvincool for the trouble. I figured this out later...
Thanks for your answer !
Title: Re: Hide Content
Post by: Elizabeth II on January 05, 2016, 07:55:06 PM
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.
Title: Re: Hide Content
Post by: 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.
Title: Re: Hide Content
Post by: Elizabeth II on January 06, 2016, 01:50:08 PM
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?
Title: Re: Hide Content
Post by: kelvincool on January 06, 2016, 02:51:21 PM
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.
Title: Re: Hide Content
Post by: 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?
Title: Re: Hide Content
Post by: kelvincool on January 21, 2016, 07:26:14 PM
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.
Title: Re: Hide Content
Post by: dexter17 on May 09, 2016, 07:35:32 AM
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
Title: Re: Hide Content
Post by: kelvincool on May 09, 2016, 02:10:55 PM
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?
Title: Re: Hide Content
Post by: dexter17 on May 09, 2016, 05:35:17 PM
you're right I had changed the categories allowed when I created ..
I solved :)
thank you very much and excuse the trouble !!!
regards
Title: Re: Hide Content
Post by: GL700Wing on March 20, 2017, 04:03:45 AM
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

Title: Re: Hide Content
Post by: Yarik1980 on November 15, 2019, 10:01:31 AM
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
Title: Re: Hide Content
Post by: dominioboys on March 24, 2020, 09:47:14 AM
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
Title: Re: Hide Content
Post by: dominioboys on March 25, 2020, 08:33:05 AM
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

Title: Re: Hide Content
Post by: Sectomy on July 15, 2020, 04:05:53 AM
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
Title: Re: Hide Content
Post by: Sectomy on July 15, 2020, 02:07:33 PM
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
Title: Re: Hide Content
Post by: Sectomy on July 17, 2020, 03:03:50 PM
or can say anyone what i have to edit in the other Editor ? which files, noone uses this mod with the WYSIWYG Editor  ? :/
Title: Re: Hide Content
Post by: Sectomy on July 18, 2020, 07:10:14 AM
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 ?)
Title: Re: Hide Content
Post by: -Rock Lee- on July 20, 2020, 01:56:07 PM
Nothing in the error log of your administrative panel? What version of PHP does your hosting work?


Regards!
Title: Re: Hide Content
Post by: lun4r on August 26, 2020, 10:14:01 AM
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!
Title: Re: Hide Content
Post by: grandseb59 on September 04, 2020, 11:45:07 AM
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 :(
Title: Re: Hide Content
Post by: Arantor on September 04, 2020, 12:52:21 PM
That and the fact I have yet to see a *good* reason to use it.
Title: Re: Hide Content
Post by: grandseb59 on September 04, 2020, 02:14:54 PM
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)
Title: Re: Hide Content
Post by: Shambles on September 04, 2020, 02:41:36 PM
Quote from: grandseb59
I also have a problem with this mod, ...

Explain your problem - let's see what we can do to help.
Title: Re: Hide Content
Post by: grandseb59 on September 04, 2020, 03:23:50 PM
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.
Title: Re: Hide Content
Post by: grandseb59 on September 08, 2020, 01:02:26 PM
plop?
Title: Re: Hide Content
Post by: kelvincool on October 16, 2020, 02:10:48 PM
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.
Title: Re: Hide Content
Post by: grandseb59 on October 20, 2020, 01:24:57 PM
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 ;)
Title: Re: Hide Content
Post by: 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?
Title: Re: Hide Content
Post by: shadav on April 18, 2021, 12:13:33 PM
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
Title: Re: Hide Content
Post by: kelvincool on May 02, 2022, 09:03:03 AM
I have updated this mod to be compatible with SMF 2.1.1 now and also made it hooks only.
Title: Re: Hide Content
Post by: gevv on May 02, 2022, 10:25:23 AM
Thanks  @kelvincool

Turkish translation
Title: Re: Hide Content
Post by: stefanop039 on November 17, 2022, 06:28:53 AM
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
Title: Re: Hide Content
Post by: kelvincool on November 17, 2022, 06:15:26 PM
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?
Title: Re: Hide Content
Post by: Matias- on February 04, 2023, 08:58:00 AM
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ú.
Title: Re: Hide Content
Post by: kelvincool on February 05, 2023, 01:31:49 PM
Hello @Matias-

I have released version 2.1.1 which should fix this issue.
Title: Re: Hide Content
Post by: Steve on February 05, 2023, 03:28:26 PM
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?
Title: Re: Hide Content
Post by: kelvincool on February 05, 2023, 04:02:45 PM
Yes @Steve, this is very much different to a spoiler mod, the content is only visible once specified criteria is met.
Title: Re: Hide Content
Post by: Steve on February 05, 2023, 04:28:09 PM
Thanks Kelvin.  :)
Title: Re: Hide Content
Post by: Matias- on February 06, 2023, 11:44:24 AM
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.
Title: Re: Hide Content
Post by: Matias- on February 12, 2023, 11:19:46 PM
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.
Title: Re: Hide Content
Post by: Diego Andrés on February 13, 2023, 01:39:36 AM
For 2, it might be better if admins can moderate the content without extra steps
Title: Re: Hide Content
Post by: 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.
Title: Re: Hide Content
Post by: Matias- on February 13, 2023, 05:54:03 AM
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.
Title: Re: Hide Content
Post by: Matias- on February 15, 2023, 06:27:14 PM
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.
Title: Re: Hide Content
Post by: kelvincool on February 16, 2023, 06:16:49 PM
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
Title: Re: Hide Content
Post by: Matias- on February 16, 2023, 09:02:17 PM
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.
Title: Re: Hide Content
Post by: Matias- on February 21, 2023, 04:02:01 PM
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)
Title: Re: Hide Content
Post by: kelvincool on February 21, 2023, 06:42:09 PM
v2.2.1 will fix that error.
Title: Re: Hide Content
Post by: Butiks on July 09, 2023, 11:37:50 AM
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 :)
Title: Re: Hide Content
Post by: kelvincool on July 11, 2023, 12:32:39 PM
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.
Title: Re: Hide Content
Post by: KeyFinder on August 09, 2023, 08:27:43 PM
Hello good

Currently I have these problems with Hide Content, any solution?
Title: Re: Hide Content
Post by: 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.
Title: Re: Hide Content
Post by: KeyFinder on August 10, 2023, 09:01:37 PM
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...

Title: Re: Hide Content
Post by: 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
Title: Re: Hide Content
Post by: KeyFinder on August 12, 2023, 10:45:42 PM
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!
Title: Re: Hide Content
Post by: kelvincool on August 20, 2023, 05:55:34 PM
v2.3.0 released

Title: Re: Hide Content
Post by: kelvincool on August 21, 2023, 03:52:46 AM
Pulling this release for now, I forgot to do something.
Title: Re: Hide Content
Post by: kelvincool on August 21, 2023, 02:36:27 PM
v2.3.0 has be released (again)
Title: Re: Hide Content
Post by: KeyFinder on August 27, 2023, 09:28:54 PM
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
Title: Re: Hide Content
Post by: kelvincool on August 28, 2023, 05:27:10 AM
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.
Title: Re: Hide Content
Post by: KeyFinder on August 28, 2023, 09:48:08 AM
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...

Title: Re: Hide Content
Post by: kelvincool on August 28, 2023, 02:51:49 PM
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...?
Title: Re: Hide Content
Post by: Electrobox on December 01, 2023, 06:56:36 PM
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.
Title: Re: Hide Content
Post by: Diego Andrés on December 02, 2023, 01:37:57 AM
Does it happen without the other tags?
Title: Re: Hide Content
Post by: Electrobox on December 02, 2023, 02:13:07 AM
Yes there is no other tags, code looks like this...

[hide post=1 liked=1]https://mega.nz/file/R2o3nYJC#8pOJodojTmuPJo8txd1BRzZAGLS2QSpSc1A79FoJG7[/hide]
Title: Re: Hide Content
Post by: kelvincool on December 02, 2023, 11:03:03 AM
@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.
Title: Re: Hide Content
Post by: Electrobox on December 02, 2023, 05:06:25 PM
Im using default SMF theme.
public_html/Themes/default
Title: Re: Hide Content
Post by: kelvincool on December 02, 2023, 05:33:26 PM
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.
Title: Re: Hide Content
Post by: Electrobox on December 03, 2023, 11:07:10 AM
Website is live, I sent you a private message with access data. Tnx
Title: Re: Hide Content
Post by: Lucarella on February 12, 2024, 04:44:50 PM
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
Title: Re: Hide Content
Post by: kelvincool on February 13, 2024, 05:40:53 PM
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.
Title: Re: Hide Content
Post by: Arantor on February 13, 2024, 05:42:55 PM
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.)
Title: Re: Hide Content
Post by: Lucarella on February 15, 2024, 02:22:31 PM
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
Title: Re: Hide Content
Post by: Lucarella on February 28, 2024, 03:22:40 PM
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
Title: Re: Hide Content
Post by: kelvincool on March 03, 2024, 04:51:41 PM
@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.
Title: Re: Hide Content
Post by: Lucarella on March 05, 2024, 01:27:12 PM
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?
Title: Re: Hide Content
Post by: kelvincool on March 11, 2024, 04:57:08 PM
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.
Title: Re: Hide Content
Post by: Lucarella on March 12, 2024, 04:14:40 PM
In fact I'm not worried, also because I haven't seen them again.

Thank's for your job
Title: Re: Hide Content
Post by: Lucarella on March 20, 2024, 03:22:40 PM
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
Title: Re: Hide Content
Post by: kelvincool on March 30, 2024, 05:42:23 PM
@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.