- Posts: 7
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Public can see introtext but only register can see full arti
Public can see introtext but only register can see full arti
- Amstaff
-
Topic Author
- Offline
- New Member
Less
More
9 years 8 months ago #146722
by Amstaff
Public can see introtext but only register can see full arti was created by Amstaff
I try to find a solution at this.
I have a menu to list a category of articles K2.
I woul like the public can see only the introtext (the text i weite in the article before "Read More"
If want to read full article they must be registered.
Someone can help me.
Thanks
I have a menu to list a category of articles K2.
I woul like the public can see only the introtext (the text i weite in the article before "Read More"
If want to read full article they must be registered.
Someone can help me.
Thanks
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 8 months ago #146729
by Krikor Boghossian
Replied by Krikor Boghossian on topic Public can see introtext but only register can see full arti
Please Log in or Create an account to join the conversation.
- Amstaff
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 8 months ago - 9 years 8 months ago #146765
by Amstaff
Replied by Amstaff on topic Public can see introtext but only register can see full arti
I try but somethings dont work well.
this is the code i change:
I add this code in generic.php, user.php, category_item.php (overide ofcourse)
But i dont see in public the introtext of article for register users.
The structure it is:
Menu: Blog (public)
Category: Blog (public)
Articles in category there are some public and some for register user.
this is the code i change:
<!-- Item "read more..." link -->
<?php $user =& JFactory::getUser(); ?>
<?php if($user->get('public') ==0 ): ?>
<!-- End of changes -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<?php echo JText::_('Read more...'); ?>
</a>
</div>
<?php else: ?>
<div class="catItemReadMore">
<a class="k2ReadMore" href="index.php?option=com_comprofiler&task=registers">
<?php echo JText::_('Subscribe to read more'); ?>
</a>
</div>
<?php endif; ?>
<!-- End of changes -->
But i dont see in public the introtext of article for register users.
The structure it is:
Menu: Blog (public)
Category: Blog (public)
Articles in category there are some public and some for register user.
Last edit: 9 years 8 months ago by Amstaff.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 8 months ago #146836
by Krikor Boghossian
This is the code that generates the introtext.
Have you edited this block?
Replied by Krikor Boghossian on topic Public can see introtext but only register can see full arti
<?php if($this->item->params->get('catItemIntroText')): ?>
<!-- Item introtext -->
<div class="catItemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
This is the code that generates the introtext.
Have you edited this block?
Please Log in or Create an account to join the conversation.
- Amstaff
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 8 months ago #146880
by Amstaff
Replied by Amstaff on topic Public can see introtext but only register can see full arti
In wich file can I find that code?
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 8 months ago #146887
by Krikor Boghossian
Replied by Krikor Boghossian on topic Public can see introtext but only register can see full arti
It is located in the same files you edited.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Public can see introtext but only register can see full arti