Keyword

Register to read more

More
15 years 3 months ago #77259 by mihha
Register to read more was created by mihha
Hi,

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.

More
15 years 3 months ago #77260 by Jochen Kästle
Replied by Jochen Kästle on topic Register to read more
hi! Look at this thread community.getk2.org/forum/topics/what-happened-to-option-for?commentId=3536014%3AComment%3A32190

...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.

More
15 years 3 months ago #77261 by mihha
Replied by mihha on topic Register to read more
Hi,

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.

More
15 years 3 months ago #77262 by Neo Jen Sen
Replied by Neo Jen Sen on topic Register to read more
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.

More
15 years 3 months ago #77263 by mihha
Replied by mihha on topic Register to read more
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.

More
15 years 3 months ago #77264 by Neo Jen Sen
Replied by Neo Jen Sen on topic Register to read more
Thanks man... i got it..

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.

More
15 years 3 months ago #77265 by leenie
Replied by leenie on topic Register to read more
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.

More
15 years 3 months ago #77266 by mihha
Replied by mihha on topic Register to read more
Hi,

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
Attachments:

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

More
15 years 3 months ago #77267 by leenie
Replied by leenie on topic Register to read more
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.

More
15 years 3 months ago #77268 by mihha
Replied by mihha on topic Register to read more
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.

More
15 years 3 months ago #77269 by leenie
Replied by leenie on topic Register to read more
That was going to be my next question, thanks!

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.

More
15 years 3 months ago #77270 by leenie
Replied by leenie on topic Register to read more
EDIT: Used this for a fix

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
  • Diego de B F e Souza Mello's Avatar
  • Offline
  • New Member
More
14 years 11 months ago #77271 by Diego de B F e Souza Mello
Replied by Diego de B F e Souza Mello on topic Register to read more
I am also going to try this. If I can make it work K2 will be the solution for my problems!

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

More
14 years 1 month ago #77272 by bergmannn
Replied by bergmannn on topic Register to read more
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.

  • Miguel Parraud Cordeyro
  • Miguel Parraud Cordeyro's Avatar
  • Offline
  • New Member
More
13 years 11 months ago #77273 by Miguel Parraud Cordeyro
Replied by Miguel Parraud Cordeyro on topic Register to read more
Is there a way to change the code for the link on titles to do the same as the "Suscribe to Read More" button?

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
  • Miguel Parraud Cordeyro's Avatar
  • Offline
  • New Member
More
13 years 11 months ago #77274 by Miguel Parraud Cordeyro
Replied by Miguel Parraud Cordeyro on topic Register to read more
Martin, how did you apply the code to the Item Title?

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.

More
10 years 6 months ago #77275 by Luca
Replied by Luca on topic Re: Register to read more
I desperatly need this feature but your code seems not works with joomla 3.3.6 and K2 2.6.8

Can anyone help me? :( :(

Luca

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 6 months ago #77276 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Register to read more
Please do not double post.

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.

More
10 years 6 months ago #77277 by Luca
Replied by Luca on topic Re: Register to read more
It don't works.

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.

More
10 years 5 months ago #77278 by Lefteris
Replied by Lefteris on topic Re: Register to read more
@Luca

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.


Powered by Kunena Forum