Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Rating system available over special string

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 2 months ago #284885 by timstohr
Hi Kyle,
I have a developing problem and that is that I have the rating system on the business account profiles and everyone can rate on it (logged in and not logged in). They can also do it when they actually have nothing to do with that person (ie just for fun or to destroy that persons business). I am sending out feedback reminder requests over email after an event has happened.

In order to get around false ratings, I was thinking of disabling the rating when one goes onto the profile itself, HOWEVER allowing rating by guests only when you add a string to the URL of the profile (eg: ?rating=allowed). That way you would not get random people rating on it because they have nothing else to do in their life but only those who are either logged in or have the right URL...

I think that would be a really good addition.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48457
  • Thanks: 8280
  • Karma: 1443
8 years 2 months ago #284892 by krileon
Replied by krileon on topic Rating system available over special string
Use CB Conditional and add a Custom > Value condition to show/hide it based off a value. It's a pretty strange condition, but the below just might work.

Display: Field conditional self
If...
Field: Custom > Value
Value...
Value: [cb:if user="#me" user_id>"0"]allowed[/cb:if][cb:if user="#me" user_id<="0"][get_rating][/cb:if]
Translate Value: No
Is...
Operator: Equal To
To...
Value: allowed
Translate Value: No
Then...
Mode: Show
For...
Registration: No
Profile Edit: No
Profile View: Yes
Userlists Search: No
Userlists View: No

In short if the user is logged in it's going to compare allowed = allowed, which will pass. If they're not logged in it's going to grab "rating" from GET (so the URL) and compare its value to allowed. This should do what you're wanting. Something like this will never be built into the ratings field though, sorry. It also completely hides the rating field instead of just disallowing rating permissions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum