Keyword

Extra field only for registered users

  • Goble002
  • Goble002's Avatar Topic Author
  • Offline
  • Senior Member
More
1 week 4 days ago #178140 by Goble002
Extra field only for registered users was created by Goble002
Hello,

am using k2 for a personal project (a photo website). K2 item will load a picture of low resolution. When a user is on the k2 item page, I would like is that the user can download the HD picture only after he is logged in. I was hoping that I could make an extra field (or it's corresponding extra field group) available only to registered users. As such I could create this extra field with the link to the image file.

After that, what would be perfect is to restrict the user to 5 downloads per day (but for this I have no idea how I can make it happen)

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

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
1 week 4 days ago - 1 week 4 days ago #178154 by Fotis
Replied by Fotis on topic Extra field only for registered users
Showing the large image to logged in users is easy. Just get the user's state (NOT guest) and echo the large image's link in <a> element with the "download" attribute. Easy-peasy.

However if you need to track the downloads per user, you need a DB table and a K2 plugin for the code to integrate that feature. And all that is beyond the scope of this support forum.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member
Last edit: 1 week 4 days ago by Fotis.

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

  • Goble002
  • Goble002's Avatar Topic Author
  • Offline
  • Senior Member
More
1 week 3 days ago #178164 by Goble002
Replied by Goble002 on topic Extra field only for registered users
Hi and thanks

1. "Showing the large image to logged in users is easy. "
I would prefer that registered users get a download link, so that it's more obvious to them that they can download after logged in.

2. "Just get the user's state (NOT guest) and echo the large image's link in <a> element with the "download" attribute. Easy-peasy."
Am not sure where to go to do this. However I don't want to manually assign individual permissions to users. I was thinking that the users will automatically be assigned this download permission because after registration they are automatically assigned to a group which has permission to download.

3. "you need a DB table and a K2 plugin for the code to integrate that feature. And all that is beyond the scope of this support forum."
Any idea if there is a k2 plugin out there ?

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

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
1 week 2 days ago #178173 by Fotis
Replied by Fotis on topic Extra field only for registered users
Like I said, 1 & 2 is possible with a K2 item override. But what you ask is a very specific customization which is beyond the scope of this support forum. The code you ask requires some time to be implemented, it's not 5-6 lines of code to just give you out.

As for 3, the short answer is no.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum