WebDev

Webdevelop => General Code/Script Inquiries => Topic started by: Duban Black on March 26, 2025, 08:08:43 PM

Title: Hide content
Post by: Duban Black on March 26, 2025, 08:08:43 PM
Is there any way to hide the content of a post so that it is only visible to those who reply in the topic?

Something similar to this mod:

https://custom.simplemachines.org/index.php?mod=4013
Title: Re: Hide content
Post by: Chen Zhen on April 12, 2025, 12:00:12 AM
You're not explaining what you're trying to accomplish in detail.

Do you want members to have the ability to read the initial (first) post in a topic but can't view any replies unless they have replied to that same topic?

-- or --

Do you want members to have the ability to read the initial (first) post in a topic but can't view any replies by other people and can only view their own replies and any replies from the original topic starter?
Title: Re: Hide content
Post by: Dave on April 15, 2025, 05:00:32 PM
Quote from: Duban Black on March 26, 2025, 08:08:43 PMIs there any way to hide the content of a post so that it is only visible to those who reply in the topic?

Something similar to this mod:

https://custom.simplemachines.org/index.php?mod=4013

What's wrong with that mod?
Title: Re: Hide content
Post by: Dave on April 15, 2025, 05:30:06 PM
OK I get it now. There is no option in the settings to allow for replies to see the hidden content, but you can set it to use 'Likes' in the current SMF2.1.4.
Title: Re: Hide content
Post by: Duban Black on April 28, 2025, 06:19:37 PM
Quote from: Chen Zhen on April 12, 2025, 12:00:12 AMYou're not explaining what you're trying to accomplish in detail.

Do you want members to have the ability to read the initial (first) post in a topic but can't view any replies unless they have replied to that same topic?

-- or --

Do you want members to have the ability to read the initial (first) post in a topic but can't view any replies by other people and can only view their own replies and any replies from the original topic starter?

I would like that to see the content inside the hide you must make at least one post in the topic.
Title: Re: Hide content
Post by: Duban Black on April 28, 2025, 06:20:10 PM
Quote from: Dave on April 15, 2025, 05:30:06 PMOK I get it now. There is no option in the settings to allow for replies to see the hidden content, but you can set it to use 'Likes' in the current SMF2.1.4.

Yes, I would like to edit the code so that instead of liking it, I can set it to make a reply in the topic
Title: Re: Hide content
Post by: Dave on September 20, 2025, 04:26:42 AM
I have attached a mod that was used in 2.0 that does what you want, but it needs updating to 2.1 if you want to use it on the latest SMF version
Title: Re: Hide content
Post by: Dave on September 20, 2025, 05:32:07 AM
Quote from: Dave on Today at 04:26:42 AMI have attached a mod that was used in 2.0 that does what you want, but it needs updating to 2.1 if you want to use it on the latest SMF version

That particular file attached in the previous post has a mysql error, I've fixed that in the one attached to this post. I have installed this on a test 2.0 site I have on localhost and it works fine, so you just need someone to update it for 2.1
EhPortal 1.40.0 © 2025, WebDev