Keyword

Restrict K2 Items Full Text To Certain User Groups

  • MGS Creativa
  • MGS Creativa's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 6 days ago #88676 by MGS Creativa
Hi...i was wondering if is possible to restrict K2 items full text
(after a user clicks "Read more" link) to certain user groups.What
I need is to show Intro Text to all users, but only subscribed members
shall be able to read full article text on selected articles.Thanks a lot!

Please Log in or Create an account to join the conversation.

More
14 years 5 days ago #88677 by Jiliko.net
Hi Martin,

Yes, it's possible to do that :

- Make an override of the K2 default item template : community.getk2.org/notes/Templating_in_K2,
- Edit the new item template php file and make a test on the K2 user group and if it's the right one, display the fulltext...I'll try to add the php extra code asap...

Olivier

Please Log in or Create an account to join the conversation.

More
14 years 5 days ago #88678 by troponin
Hey Martin,
hey Olivier,

no need to add the Code for you Olivier. I have it already in use. Modify the category_item.php Search the point (must be Line 325 till 332) and replace the Code with the attached txt.

readmore_hack.txt
greets

Please Log in or Create an account to join the conversation.

  • MGS Creativa
  • MGS Creativa's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 days ago #88679 by MGS Creativa
Replied by MGS Creativa on topic Restrict K2 Items Full Text To Certain User Groups
Hi, thanks for the hack, but it is not exactly what i wanted...sort of...

I need to restrict full text to certain articles, so free users can read full text on some selected articles, not on all articles. but subscibed user may read all articles full text.

Thanks in advise!

Please Log in or Create an account to join the conversation.

More
14 years 4 days ago #88680 by troponin
Put the Hack in a special Template (maybe "Restricted") and give the special Items the Template. Should work.

Martin said:Hi, thanks for the hack, but it is not exactly what i wanted...sort of...
I need to restrict full text to certain articles, so free users can read full text on some selected articles, not on all articles. but subscibed user may read all articles full text.

Thanks in advise!

Please Log in or Create an account to join the conversation.

More
14 years 4 days ago #88681 by william white
Replied by william white on topic Restrict K2 Items Full Text To Certain User Groups
@troponin
your code works well, thanks
i did have to change the link to my proper registration page though....good work!

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #88682 by BBC
Take off Title and Image linking in category list view, and via some extra field put text, "login to read more". Or something like that. And link that text to login form.

 

Don´t know how to fix redirect after login. It has to be some easy solution.

Marius said:

I need the same hack...but only for featured articles.

 

Let's say I want guests to see all articles except featured ones (for these articles they can see only the introtext and picture in the category item page). When click on Read more link or title link they get a message that they need to register.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #88683 by william white
Replied by william white on topic Restrict K2 Items Full Text To Certain User Groups
Ning!at the present time

Click my page - my apps

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum