Keyword

Login to Read More

More
11 years 6 months ago #106300 by jo
Login to Read More was created by jo
Hello

Can someone help. I have searched online high and low but can not find a solution to something that seems it should be an obvious thing to want!

I just want to have the intro of an article available to everyone, and the full article available to members only. Just a simple: login to read more...... action.

I am using Joomla 2.5.8 and K2 2.6.1

Perhaps I'm asking the wrong question when I search. Am I missing something?

Many thanks

Jo

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

More
11 years 6 months ago #106301 by Gregwh
Replied by Gregwh on topic Re: Login to Read More

jo wrote: Hello

Can someone help. I have searched online high and low but can not find a solution to something that seems it should be an obvious thing to want!

I just want to have the intro of an article available to everyone, and the full article available to members only. Just a simple: login to read more...... action.

I am using Joomla 2.5.8 and K2 2.6.1

Perhaps I'm asking the wrong question when I search. Am I missing something?

Many thanks

Jo



Interesting. Never thought of it quite like that. I run a site www.sell-my-books.com and of course I want people to read some of the book and pay for the rest, for the authors who come to the site. In order to achieve that I had to get PayPerDownload Plus which also works with Joomla Articles and K2 Items to be read. However, it does that in 2 ways:

1) Completely denying access to the item until you logon and when you logon, then pay for the one to be pay to be read.

or

2) Allows you to put, through it and not through the normal READ MORE, the ability to read whatever portion you think is right. Within the K2 item or Joomla Article, you place a "pay to read more" internal link that stops the item from displaying anything more than you have allowed and then asking you to logon and then after that, to pay for reading it, which is the whole idea of my site.

So, when I first thought the idea up, I went down that path and after much research, it appeared to me that to do what you want to do or I want to do, you need to go to the Joomla Extensions area and search for a pay to read more link that works with K2, stops the person reading more and demands they logon, as it does for me.

Your only other alternative would be to have the part OK for anyone to read with a PUBLIC access level and the rest with REGISTERED in 2 separate K2 items and tell people they can see the rest if they logon. One thing wrong with doing it this way is that it deters people from coming to your site. So a Joomla extension is the only thing I can see, personally, that will work for you short of being able to code for yourself (which I cant).

Greg.

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

More
11 years 6 months ago #106302 by jo
Replied by jo on topic Re: Login to Read More
Hi Greg

Hum, i;llcheck out the extension you used. However, couple of things;

1. I understand that this function is available when using Joomla as the core content management by selecting the "show unauthorised link" option. However, I like K2! I find it much more flexible for displaying and organising content.

2. I thought about the idea of having 2 items: 1 intro - opento all and 2. the full article with permissions set to "Registered". The probelm with this is that I am building a community site that allows members to submit articles and I don't want to confuse the issue for them by asking them to take the 2 steps, rather than just the one.

3. I came across another extension, but it required putting different tags around the open part and the registered part - again, I didn't want to confuse thecontributors by requiring additional steps.

4. I also came across a hack for changing some code in k2, but it was for an earlier version and the directories were labeled differently and i'm just not experienced enough to risk it! Having said that of course, I'll never get expereinced until I risk it!

I just thought this would be a basic feature for K2, haven't needed it on previous sites and didn't expect it to be a problem now that I do.

Looks like I may have to just roll my sleaves up and dive in with the hack.

Will check out the extension you mentioned, and post anything else I find. I am sure there must be plenty of other folk looking for the same functionality.

Thanks again

Jo

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

More
11 years 6 months ago #106303 by william white
Replied by william white on topic Re: Login to Read More
If all you want to do is hide full text
use something like this to wrap around the parts you wan to hide in an override

$user =& JFactory::getUser();

if (!$user->guest) {
display fulltext
} else {
display message to registar to readmore
}

docs.joomla.org/JFactory/getUser

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

More
11 years 5 months ago #106304 by jo
Replied by jo on topic Re: Login to Read More
Hi,

No i'm afraid that isn't going to work for what I need. Think I'm going to have to drop K2 for this particular site. Will have to work with the standard Joomla content management feature.

thanks anyway

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

More
11 years 5 months ago - 11 years 5 months ago #106305 by Alex B.
Replied by Alex B. on topic Re: Login to Read More

jo wrote: Can someone help....
I just want to have the intro of an article available to everyone, and the full article available to members only. Just a simple: login to read more...... action.


If you consider commercial extensions as well, then may find our module helpful.
Our RAXO All-mode K2 module works with K2 content and has the functionality you request.

Show Non-public Content Option
In module blocks you can show part of K2 access restricted items publicly (for all visitors). When an anonymous user clicks title/read more link, he doesn’t see hidden information but is redirected to registration/login form.
This option can be quickly enabled/disabled in module administration panel.

This new feature will be extremely useful for sites that have a content restricted area, which usually require registration/sign up/membership/etc. to get access to this non-public content. The best way to encourage site visitors to register and join site community is to show short teasers of the hidden content. When a user sees a part of access restricted information he becomes really motivated to start registration immediately and get access to the full information.

You can read more about this module in blog announcement post:
raxo.org/blog/news/76-raxo-all-mode-k2-j25-announcement.html

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

  • Tomasz Bieliński
  • Tomasz Bieliński's Avatar
  • Offline
  • Senior Member
More
11 years 1 month ago #106306 by Tomasz Bieliński
Replied by Tomasz Bieliński on topic Re: Login to Read More
Hi William
Thanks for your tip. Unfortunately I am not clever enough to manage myself ;-(
Below is a part of item.php file which should be (I presume) overrided. Could you edit it, please according to your tip?
<?php if(!empty($this->item->fulltext)): ?>
<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<div class="itemFullText jbintrotext">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemFullText')): ?>
<!-- Item fulltext -->
<div class="itemFullText">
<?php echo $this->item->fulltext; ?>
</div>
<?php endif; ?>
<?php else: ?>
<!-- Item text -->
<div class="itemFullText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>

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


Powered by Kunena Forum