Keyword

Public can see introtext but only register can see full arti

  • Amstaff
  • Amstaff's Avatar Topic Author
  • Offline
  • New Member
More
9 years 1 month ago #146722 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

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #146729 by Krikor Boghossian
Replied by Krikor Boghossian on topic Public can see introtext but only register can see full arti

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

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

  • Amstaff
  • Amstaff's Avatar Topic Author
  • Offline
  • New Member
More
9 years 1 month ago - 9 years 1 month ago #146765 by Amstaff
I try but somethings dont work well.
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  -->
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.
Last edit: 9 years 1 month ago by Amstaff.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #146836 by Krikor Boghossian
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?

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

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

  • Amstaff
  • Amstaff's Avatar Topic Author
  • Offline
  • New Member
More
9 years 1 month ago #146880 by Amstaff
In wich file can I find that code?
Thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month 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.

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