COMMUNITY FORUM
Restrict K2 Items Full Text To Certain User Groups
- MGS Creativa
-
Topic Author
- User
Less
More
14 years 7 months ago #88676
by MGS Creativa
Restrict K2 Items Full Text To Certain User Groups was created 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!
(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.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 7 months ago #88677
by Jiliko.net
Replied by Jiliko.net on topic Restrict K2 Items Full Text To Certain User Groups
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
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.
- troponin
-
- Offline
- Platinum Member
Less
More
- Posts: 398
14 years 7 months ago #88678
by troponin
Replied by troponin on topic Restrict K2 Items Full Text To Certain User Groups
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
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
-
Topic Author
- User
Less
More
14 years 7 months 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!
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.
- troponin
-
- Offline
- Platinum Member
Less
More
- Posts: 398
14 years 7 months ago #88680
by troponin
Replied by troponin on topic Restrict K2 Items Full Text To Certain User Groups
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!
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.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 7 months 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!
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.
- BBC
-
- Offline
- Platinum Member
Less
More
- Posts: 663
14 years 2 months ago #88682
by BBC
Replied by BBC on topic Restrict K2 Items Full Text To Certain User Groups
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.
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.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 2 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
Click my page - my apps
Please Log in or Create an account to join the conversation.