- Posts: 2
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- How do I make extra fields visible to registered users alone
How do I make extra fields visible to registered users alone
- David Michael
- Topic Author
- Offline
- New Member
Less
More
7 years 2 months ago - 7 years 2 months ago #160474
by David Michael
How do I make extra fields visible to registered users alone was created by David Michael
Please help,
I have a demo website, I want to show extra fields to registered users alone. I have searched through every forum but havnt been able to find an answer. Dont know what code to change or even the code to write to effect this. Any help will be much appreciated.
All i want is for the item view page not to show extra fields unless the person viewing is a registered member.
Thanks you
Edit: i believe what i want to do is to show 'extra field group to registered users. So i will appreciate if anyone can help with the code for this.
Thanks again
I have a demo website, I want to show extra fields to registered users alone. I have searched through every forum but havnt been able to find an answer. Dont know what code to change or even the code to write to effect this. Any help will be much appreciated.
All i want is for the item view page not to show extra fields unless the person viewing is a registered member.
Thanks you
Edit: i believe what i want to do is to show 'extra field group to registered users. So i will appreciate if anyone can help with the code for this.
Thanks again
Last edit: 7 years 2 months ago by David Michael. Reason: update
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #160487
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic How do I make extra fields visible to registered users alone
Please read this thread:
www.joomlaworks.net/forum/k2-en/37670-solved-premium-content-items-invisible-if-not-logged-in
www.joomlaworks.net/forum/k2-en/37670-solved-premium-content-items-invisible-if-not-logged-in
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- David Michael
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
7 years 2 months ago #160493
by David Michael
Replied by David Michael on topic How do I make extra fields visible to registered users alone
Thank you admin for the response. However the link you pointed me to isnt of much help. I am very poor at php, from all i have been reading, i have noticed i just need to edit the k2 item.php in my template override. However, i dont know what code in specific or how to go about it. I will so much appreaciate a noob guide. I can send you the details of the webpage to have a look for me. Thanks again for taking time from your busy schedule to reply me.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #160508
by Krikor Boghossian
As for the actual code which is used for the extrafields you can look at the item.php file's comments in order to identify the block or you can ask your template's provider.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic How do I make extra fields visible to registered users alone
$user = JFactory::getUser();
if ($user->guest) {
echo "<p>You must login to see the content. I want your email address.</p>";
} else {
// PASTE THE TEMPLATE"S CODE FOR EXTRAFIELDS
}
As for the actual code which is used for the extrafields you can look at the item.php file's comments in order to identify the block or you can ask your template's provider.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- How do I make extra fields visible to registered users alone