Keyword

[Solved] Restrict K2 Items Full Text to unregistered users

  • Anurag Pandey
  • Anurag Pandey's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 2 months ago - 8 years 8 months ago #115667 by Anurag Pandey
Hi forum,
I need to restrict K2 Items Full Text to unregistered users /certain User Groups, so anyone can see introtext, but only registered users can see full text.
Plz help...... Thanks in advance

Regards With :whistle:
Last edit: 8 years 8 months ago by Anurag Pandey. Reason: Solved

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 2 months ago #115668 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Restrict K2 Items Full Text to unregistered users
Hello Anurag,

You need to read this post getk2.org/community/New-to-K2-Ask-here-first/178670-SOLVED-how-attachment-file-to-give-privilege

Then use the snippet in your item.php

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Anurag Pandey
  • Anurag Pandey's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 2 months ago #115669 by Anurag Pandey
Replied by Anurag Pandey on topic Re: Restrict K2 Items Full Text to unregistered users
Hi Admin
Thanks for your reply. As per I found same code by default in my item.php file I am confused where to apply the code given in snippet suggested by you. However by using instruction on

getk2.org/community/New-to-K2-Ask-here-first/135860-Register-to-read-more


1. create the following folder structure under your template's folder (if html folder already exists, omit it)

html
com_k2
templates
default

2. copy the following files under templates folder
generic.php
user.php
3. copy the following file under the default folder
category_item.php

Apply code changes as described in attached txt file. This post editor doesn't allow me to insert code in the post directly.

Do the code changes in all three php files that you copied in step 3


I apply the changes described. its working and it displayed "Login/Register" link instead of "ReadMore" to guest but the problem is if registered member copy the url of item (full text view) after logout the same item cam be accessed public by pasting the url. Kindly help

Thanks and Regards

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 2 months ago #115670 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Restrict K2 Items Full Text to unregistered users
Hello Anurag,

If you choose to edit user.php you might also might want to edit tag.php as well.
Also the user.php file is under the default folder and not the templates folder.

Which cache are you using? Also can you please send me a URL?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Anurag Pandey
  • Anurag Pandey's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 2 months ago - 11 years 2 months ago #115671 by Anurag Pandey
Replied by Anurag Pandey on topic Re: Restrict K2 Items Full Text to unregistered users
Hi Admin
Thanks for your prompt reply again !
As per your earlier post if I go to edit "item.php" where to edit and what is code as I am not very much familiar with coding.
Waiting for your response

Thanks and Regards
Anurag

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

  • Anurag Pandey
  • Anurag Pandey's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 2 months ago #115672 by Anurag Pandey
Replied by Anurag Pandey on topic Re: Restrict K2 Items Full Text to unregistered users
Hi Admin
I am waiting for your reply

Thanks and Regards
Anurag Pandey

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

  • Anurag Pandey
  • Anurag Pandey's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 2 months ago #115673 by Anurag Pandey
Replied by Anurag Pandey on topic Re: Restrict K2 Items Full Text to unregistered users
Hi Admin
Thanks for reply, however it seems to be it is quite tough to implement using K2 but it easy by using joomla articles (show unauthorized links). This is test project so now I make it using joomla articles system. k2 is very good but I select easy method.
Thanks again for your support.

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

More
11 years 1 month ago #115674 by Drazen

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


Powered by Kunena Forum