- Posts: 17
COMMUNITY FORUM
Register to read more
- mihha
-
Topic Author
- Offline
- New Member
I am trying to figure out how to achieve something that Joomla has for a very long time.
I would like to show only intro text for a guests and the text "Register to read more". When guests clicks on that link, they would be redirected to the registration form.
This can be achieved with "Show unauthorized links" in Joomla
How can I achieve the same in K2? Is that possible?
Please Log in or Create an account to join the conversation.
- Jochen Kästle
-
- Offline
- New Member
- Posts: 13
...should give you an idea of what to do. You only have to find a way to redirect to login module!
Please Log in or Create an account to join the conversation.
- mihha
-
Topic Author
- Offline
- New Member
- Posts: 17
thank you for a quick reply. I was hoping that by now, this feature would be implemented in K2. Fotis mentioned that this is already possible (in a Twitter conversation) but I was never able to achieve this.
This would be a great feature if developers could add it in the official installation
Jochen Kästle said:hi! Look at this thread community.getk2.org/forum/topics/what-happened-to-option-for...
...should give you an idea of what to do. You only have to find a way to redirect to login module!
Please Log in or Create an account to join the conversation.
- Neo Jen Sen
-
- Offline
- New Member
- Posts: 5
Im having the same requirements... user to login/register before allowing to see the full text. Has anyone found a solution without hacking the k2 codes? Aint keen to do that since I planning to move to the latest version v2.2 shortly...
Please Log in or Create an account to join the conversation.
- mihha
-
Topic Author
- Offline
- New Member
- Posts: 17
you can easily apply changes to the articles and categories views if you use overrides in Joomla.
Just copy needed files in your template/html folder (create one if you don't have it) and make changes. Good thing about K2 is that you just need to make changes to the representation layer so you can easily and without fears upgrade K2 and your changes will stay as you want them.
I did those changes and the result can be visible here
Neo Jen Sen said:Hi,
Im having the same requirements... user to login/register before allowing to see the full text. Has anyone found a solution without hacking the k2 codes? Aint keen to do that since I planning to move to the latest version v2.2 shortly...
Please Log in or Create an account to join the conversation.
- Neo Jen Sen
-
- Offline
- New Member
- Posts: 5
Igor Mihaljko said:Hi,
you can easily apply changes to the articles and categories views if you use overrides in Joomla.
Just copy needed files in your template/html folder (create one if you don't have it) and make changes. Good thing about K2 is that you just need to make changes to the representation layer so you can easily and without fears upgrade K2 and your changes will stay as you want them.
I did those changes and the result can be visible here
Neo Jen Sen said:Hi, Im having the same requirements... user to login/register before allowing to see the full text. Has anyone found a solution without hacking the k2 codes? Aint keen to do that since I planning to move to the latest version v2.2 shortly...
Please Log in or Create an account to join the conversation.
- leenie
-
- Offline
- New Member
- Posts: 5
Thanks!
LeAnn
Igor Mihaljko said:Hi,
you can easily apply changes to the articles and categories views if you use overrides in Joomla.
Just copy needed files in your template/html folder (create one if you don't have it) and make changes. Good thing about K2 is that you just need to make changes to the representation layer so you can easily and without fears upgrade K2 and your changes will stay as you want them.
I did those changes and the result can be visible here
Please Log in or Create an account to join the conversation.
- mihha
-
Topic Author
- Offline
- New Member
- Posts: 17
I will try. Here are the steps you should follow before you even apply code changes:
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 hope that you will succeed. Observe that I am using Community builder so I placed a link to it's registration page in my code changes
LeAnn Brewster said:I also need a 'register to read more' function. Can you explain this process a bit more for a newbie?
Thanks!
LeAnn
Igor Mihaljko said:Hi, you can easily apply changes to the articles and categories views if you use overrides in Joomla.
Just copy needed files in your template/html folder (create one if you don't have it) and make changes. Good thing about K2 is that you just need to make changes to the representation layer so you can easily and without fears upgrade K2 and your changes will stay as you want them.
I did those changes and the result can be visible here
Please Log in or Create an account to join the conversation.
- leenie
-
- Offline
- New Member
- Posts: 5
Igor Mihaljko said:Hi,
I will try. Here are the steps you should follow before you even apply code changes:
Please Log in or Create an account to join the conversation.
- mihha
-
Topic Author
- Offline
- New Member
- Posts: 17
LeAnn Brewster said:Awesome that worked! Only thing is un-registered users can still click on the item title and see the full story. I just made titles non-linked and problem solved! Thanks so much!
Igor Mihaljko said:Hi, I will try. Here are the steps you should follow before you even apply code changes:
Please Log in or Create an account to join the conversation.
- leenie
-
- Offline
- New Member
- Posts: 5
Igor Mihaljko said:I know. I did the same. If you use K2 module to show articles, you will have to apply those code changes in the same way.
LeAnn Brewster said:Awesome that worked! Only thing is un-registered users can still click on the item title and see the full story. I just made titles non-linked and problem solved! Thanks so much! Igor Mihaljko said:Hi, I will try. Here are the steps you should follow before you even apply code changes:
Please Log in or Create an account to join the conversation.
- leenie
-
- Offline
- New Member
- Posts: 5
One other question, how do I make it so the image in a content item is not linked to the full article? Or make it so that it takes them to a login form when clicked?
Please Log in or Create an account to join the conversation.
- Diego de B F e Souza Mello
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.
- bergmannn
-
- Offline
- New Member
- Posts: 3
i have apply this also to unlink the Item Title and the Item image in category layout and on the K2 content module in order to block not registered users to read the full article...Thanks again and regards from Italy
Please Log in or Create an account to join the conversation.
- Miguel Parraud Cordeyro
-
- Offline
- New Member
- Posts: 7
I'm asking because I'm not using the "Read More" link, I'm using the title link.
Please Log in or Create an account to join the conversation.
- Miguel Parraud Cordeyro
-
- Offline
- New Member
- Posts: 7
Can you show me?
Thanks!
Martin Bergmann said:
Many thank's for this pieces of code...
i have apply this also to unlink the Item Title and the Item image in category layout and on the K2 content module in order to block not registered users to read the full article...Thanks again and regards from Italy
Please Log in or Create an account to join the conversation.
- Luca
-
- Offline
- New Member
- Posts: 3
Can anyone help me? :( :(
Luca
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You can make these changes on your template.
You can use Joomla!'s user function docs.joomla.org/Accessing_the_current_user_object
to show/ hide elements in your template.
This post will help you with the overrides.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Luca
-
- Offline
- New Member
- Posts: 3
Can you help me with this? I can pay for this work.
I need feature "show unauthorized items" for K2.
Luca
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
We do not take over customizations. However someone else in the community might be able to do this for you.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.