Keyword

Limiting the number of Items a user can create in a category

  • Chris Hood
  • Chris Hood's Avatar Topic Author
  • Offline
  • New Member
More
8 years 2 months ago #156492 by Chris Hood
Hi!

We currently have a website in development which offers members the ability to advertise their services in the music industry. They register as a single user, then create their profile ads as K2 Items. We've done this (rather than use their K2 User profiles) so they can create multiple profiles; for example if they are a singer, guitarist and songwriter, and want to place a seperate ad in each category (3 in this case) focussing on those skills.

I'm using a technique of using the pagination count (credit to Krikor for that, I believe) to determine how many items a user has created, to prevent them from posting, say, more than 5 (IE on their account page, if pagination count for total items published <= 5, display "Create new Item" button).

But what we really want to do is allow every member to post 1 item max in each category. A guitarist doesn't need 2 profiles, and it would just look a lot more professional for the site if, perhaps, the category they've already posted in greys out or doesn't display when creating an item, or if we can use multiple "create an item" buttons that go to different categories, and have them only display if "# of items the user has created in this category = 0".

Would anyone be able to help me here?

Thanks!

Chris
Vibe Websites

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156498 by Krikor Boghossian
Replied by Krikor Boghossian on topic Limiting the number of Items a user can create in a category
Hello Chris,

For this functionality you will need a K2 plugin which will check the current user's id and the number of items in a given category.

If the query returns more than the maximum allowed number of items, you can block the user from entering that specific category.

Without being 100% sure, this can be done with an override if you are using frontend editing.

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

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

More
7 years 3 months ago - 7 years 3 months ago #162236 by Edoardo Maciel
Hi, I know that this post is very old but I was looking for some plugin that made this function and I had no luck. Krikor, do you know any good ones?
Last edit: 7 years 3 months ago by Edoardo Maciel.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 3 months ago #162251 by Krikor Boghossian
Replied by Krikor Boghossian on topic Limiting the number of Items a user can create in a category
Unfortunately I will have to let you down Edoardo.
Sorry.

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