Disable Drupal 7 fivestar widget after vote is done - drupal-7

Co's,
I am a newbie to drupal. I am using Drupal 7,fivestar,userpoints and voting rules modules in my intranet site. I created new rules by using the Rules module to award points to the content author based on the rating ( no of stars etc) provided by the logged in users. This is working fine.
But the problem is , whenever the logged in user clicked the fivestar widget, an event fires and the content author getting points based on the rules defined.
To resolve this, I want to disable the fivestar widget after the logged in user clicked the fivestar widget once.
How can we make it ? Could you please suggest how to achieve this ?
Version details for the modules i am using are below.
Fivestar 7.x-2.0-alpha2
Voting API 7.x-2.6
Userpoints 7.x-1.0
Voting Rules 7.x-1.0-alpha1
Rules 7.x-2.1

You must add a condition to the rule, something like "if user hasn't vote on the content yet". Probably you can achieve this just using the rules interface, otherwise you will have to do a little research on the fivestar api to verify users vote on a specific node.
Hope that helps!

Related

Adding an optional checkbox to a user registration form in wordpress

I would like to add an optional checkbox to a user registration form saying "I want to be included in marketing activities and product updates". I would like to then accordingly register the user preference... is there a way to do that?
Thank you in advance!
So far, I did not find any plugin or able to do so.
One way to do this is to use a plugin like Gravity Forms or Contact Form 7. These plugins allow you to create custom forms and include checkboxes or other form fields. Once the form is submitted, the plugin will store the user's preference in the database.
There are a few different paid plugins available that do user registration such as Gravity Forms, Fluent Forms, and WP Forms.
There is also the following free plugin for user registrations... User Registration – Custom Registration Form, Login Form And User Profile For WordPress
However, do note that you will need to upgrade to the premium plugin (or use one of the paid plugins mentioned) if you are looking to conditionally integrate user submissions into your marketing email campaign (e.g. sync with Mailchimp).

How can I filter skills in Twilio Flex Team View page

How can I filter the skills list on the Twilio flex team view page? I need to filter the skills based on the worker role. I can detect the role from worker attributes. But how can I filter the skills displaying in team view when clicking on agent name at Twilio flex. I don't want to display all skills, I want to display some of them.
Or, is there any listener that I can use to detect when that panel is opening? In that situation, I can filter the skills view using the DOM selector.
Twilio developer evangelist here.
I don't have a good answer for you, I'm afraid, as that's a bit further into Flex than I've managed to go. However, I have some ideas.
You can listen for a worker to be selected in the supervisor view using the Actions Framework SelectWorkerInSupervisor action (you can listen to beforeSelectWorkerInSupervisor or afterSelectWorkerInSupervisor.
The thing I'm not sure about is how to actually filter the skills. I was looking at this filtering plugin for inspiration but I couldn't quite tell what was going on. I wonder if you can affect the state in redux based on your currently selected worker.
Sorry, this isn't a full answer. Hopefully it gives you some ideas though.

Salesforce Knowledge Article Field - Not Visible to Guest User

I am very new to Salesforce, so apologies if my use of terms is not correct.
I am using Lightning Knowledge
I have enable and setup Knowledge Base and added FAQ articles and have added Question and Answerr fields to those articles.
I have setup the field visibilty so they are visible to all user including "Read Only" users (I could not find anything specific for Guests, should there be?)
So as far as I can tell the field permissions on the Question and Answer fields is correct.
I create articles and enter my values for my "Question and Answer fields" but when I go to my public site to view the FAQ, I only see the content of the Title and URL Name fields. I do not see my Question and Answer Fields.
If I login and view the articles via the public site, I do see the Question and Answer values.
I would very much appricaite it if anyone could point me in the right direction for trying to figure this out. I have googled but cannot seem to find anything that talks about guest users and field visibilty that has helped me.
Many Thanks
Derek
Yes, guest user is still an user. There's hidden user account (which acts as "created by" when you make new Case for example) and Profile which you might have to edit. It doesn't show up on normal list of profiles (but for example the Id can be queried and once you know Id you could construct the url yourself).
If you're using an Experience Cloud (aka Community) go to your site's Builder and the links will be at the bottom.
If you're using Sites - it should be in Site's config.
I had the exact same issue, but did see the solution documented in the previous comments.
In your community navigate to Settings
Select General
Click link under Guest User Profile
Scroll down to Field-Level Security
Click View for Knowledge
Click Edit
Check the Read Access box for the fields which are not displaying
Click Save

How to make a page with a list of Users in a Salesforce Community?

So I'm completely new to Salesforce Communities and working with the Experience Builder which is where I think this task would need to be done.
I want to display a list of Users in the Community (specifically only ones associated with the same Account as the current User) showing a certain set of fields and allowing in-line edits.
I see there's already a set of pages for User list, profile, and related list, but the User List page is blank by default. I found the Record List component for Experience Builder, but it does not appear to support User.
I'm considering making a Lightning Component that displays my table of Users to then use as a component in Experience Builder, but I'm not sure how involved of a process that would be or if there is a more straightforward approach.
How can I go about making this?
(If it matters, when I first made the Community I believe I selected "Customer Service")

Make logged-in author user in wagtail

This seems like a really simple requirement for a blogging app or CMS:
How do you automatically make the logged-in user the author of a wagtail page? For example, if I log in as "Bob" and type a post, the author should automatically be "Bob".
Normally I would simply write it into my Django views but since I'm using Wagtail I expect it to be in the main package. However, the docs don't mention it, and the official demo seems to imply that authors must be chosen from a dropdown select box, which means any author can pretend to be anyone else!
We access the People object with an inline panel that references the
ParentalKey's related_name in BlogPeopleRelationship.
Is there a feature I've missed?
The user who created a page is available as the property owner:
http://docs.wagtail.io/en/stable/reference/pages/model_reference.html#wagtail.core.models.Page.owner
This is used within Wagtail for permission checks (a user with 'add' but not 'edit' permission can edit pages that they have created themselves), but it can also be displayed on your site front-end as the page author if you so desire.

Resources