YAFLogo

Dimi
  • Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
12 years ago
Is it possible to implement the following feature? I'd like to show the beginning of the posting to all the readers including guests, but the complete article should be shown only to the registered users and all the tries to open the rest of the article should open a registration window. We can add a new BBCode or TAG to the tag list and call it, say,
[REGONLY]
My Hidden Text visible only to the registered users. This text should be replaced with the button to make the unregistered readers, aka guests, start their registration.
[/REGONLY]
and place the text that should be hidden for unregistered users inside this tag. It's very easy! And it will add a very flexible and convenient way to push the guests to register on the forum.

Dimi
UserPostedImage
Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
12 years ago
Yes it is possible. I am working on it.


This will hide the content from guests, and shows an info.

But this is more flexible you can define which roles should be able to see the content for example

[HIDE=Administrators;Role1]Hide this from a guest
[url=http://www.watchersnet.de]www.watchersnet.de[/url][/HIDE]

Shows the Content only to admins and users of a Role1
Dimi
  • Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
12 years ago
Originally Posted by: tha_watcha 

Yes it is possible. I am working on it.


This will hide the content from guests, and shows an info.

But this is more flexible you can define which roles should be able to see the content for example

[HIDE=Administrators;Role1]Hide this from a guest
[url=http://www.watchersnet.de]www.watchersnet.de[/url][/HIDE]

Shows the Content only to admins and users of a Role1


That's great. But I guess to show to administrators it's better be used as
[SHOW=Administrators]Hide this from a guest
[url=http://www.watchersnet.de]www.watchersnet.de[/url][/SHOW]

Although I can live with that, this is the wrong meaning - SHOW comparing to HIDE. Maybe I'm wrong.:)

P.S. Maybe even HIDEEXCEPT would be much better!
P.P.S From your screen shot it is not clear if we can hide the part of the message, but I'm sure we can.
Dimi
UserPostedImage
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
12 years ago
Quote:

Although I can live with that, this is the wrong meaning - SHOW comparing to HIDE. Maybe I'm wrong



No, you are right is swapped the logic

[HIDE=Role2;Role1]Hide this from a guest
[url=http://www.watchersnet.de]www.watchersnet.de[/url][/HIDE]

- This will hide the content from role1 and role 2
- the content is always hidden from guests
- the post author always can see its own content
- admins always see the content

Quote:

Maybe even HIDEEXCEPT would be much better!



I have choosen HIDE because this is a common bbcode also used in other forums with the same logic (Hide from guests)

Quote:

From your screen shot it is not clear if we can hide the part of the message, but I'm sure we can.



Correct only the content inside the HIDE tag are hidden
OmidID
  • OmidID
  • 51.2% (Neutral)
  • YAF Forumling
12 years ago
Hi every body.
I try this code and is not work for me, i have to enable any option???

Thanks
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
12 years ago
Originally Posted by: OmidID 

Hi every body.
I try this code and is not work for me, i have to enable any option???

Thanks



The bbcode can not work, because it is currently not included inside yaf. It will be included in yaf 1.9.5.6
OmidID
  • OmidID
  • 51.2% (Neutral)
  • YAF Forumling
12 years ago
Very nice, i still waiting...
Is bbcode to force thanks will be implement on the next version?
I can see the SHOW code for Role, is it possible to use it for Medal or Rank?
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button