Questions tagged [flags]
Use it for the module implementing a flexible flagging system, completely customizable by the administrator users: the Flag module.
478
questions
17
votes
6
answers
7k
views
View of users flagged by a user, users flagging a user, and nodes from users flagged by a user
I have a user flag that is pretty much like a "follow" or "subscribe" function.
Basically I want to create 3 views for my website's user profile pages:
A list of users flagged by a user (e.g. a ...
9
votes
2
answers
6k
views
How can I flag content programmatically?
The Flag module is still in development for Drupal 8, but it's working nice. However, I didn't find how to add a flag programmatically; the API documentation seems to speak of the Drupal 7 version.
...
8
votes
3
answers
5k
views
How to display a flag to anonymous users?
I'm using the Flag module, but I have a problem in displaying a flag to anonymous users.
I have 2 flags called "make feature" and "add to Favorites". I want to display this flag to anonymous users ...
8
votes
2
answers
1k
views
How to make possible to flag only one node
I have a view with lists of 10 nodes with a node display type (not rows). Every node has a flag. How to make possible to flag ONLY one node of these 10 nodes, for example if you have flagged one node -...
7
votes
1
answer
2k
views
How can I simplify the use of flags with Views Bulk Operations?
I have an administrative display (made with views) that lists content that is pending approval.
In the case of my site, approval means flagging with the approval_for_pub flag (which triggers a custom ...
7
votes
5
answers
535
views
How to ask anonymous to confirm their flag by email?
I need to add Flags to one of my content types. Two kinds, actually:
I'll take care of it
Solved
Second flag should be available only to node author, and only if first one was already raised. But ...
6
votes
1
answer
1k
views
What is the proper format for the flag service calls?
I'm running Drupal 7 with the Services 3 and the Flag Service modules installed. I'm having trouble trying to figure out how to format the the call in REST format. Can someone provide a short example?...
6
votes
2
answers
2k
views
How do I send an email to all users that has flagged a node using rules?
I need to send an email when there is a new comment on a node to all users that have flagged that node? How do I do this?
The flag is called "Follow" and the content type is "Blog"
6
votes
1
answer
1k
views
How to create a view of unread comments on own nodes for the user's profile page?
I'd like to create a view for the user's profile page that displays all unread comments on the nodes he/she created. When I say 'unread', I mean that the page where the comment is situated (namely, ...
5
votes
6
answers
6k
views
How to add a custom icon or symbol to a flag link?
I'm working on a 'sample request' implementation for a commerce site using Flag, Views, sessions and a little custom code.
I'd like to add an icon or a symbol to let people know that an item they are ...
5
votes
2
answers
2k
views
sort a view by Most Viewed, Most Favorited, Latest
I have view which contains all nodes of a content type(article). default sort criteria of view is recent nodes. But i have three links Most Viewed, Most Favorited, Latest.I have to sort this view by ...
5
votes
2
answers
4k
views
How to create basic Organic Groups functionality with flags and references?
I've used Organic Groups for the past 6 months and found it to complex for my simple use case. Creating even basic views to show users of a group or content of a group turns quickly into "rocket since"...
5
votes
2
answers
260
views
Flagging users as spam and giving a reason for doing so
I am creating a community site using Drupal7. The users of my site should be able to report other users as spam users. For this I am using the Flag module. I have created a flag called Report User for ...
5
votes
1
answer
5k
views
How to create custom rules action event conditions?
Is there any universal formula or module to create custom rules actions, events and conditions? So that I just have to replace the required values and rest of the code remains the same. I searched, ...
5
votes
2
answers
431
views
How can I allow users to add a reason for a flag?
I have the Flag module installed on my Drupal 7.8 site, but I can't figure out how to allow users to submit a reason for a flag along with the flag. I've tried looking this up, but the only thing I ...
5
votes
3
answers
5k
views
How do I customize the flag/unflag links? [duplicate]
I'm fairly new to Drupal theming, and I am trying to customize the HTML output the Flag module for Drupal 8 produces for flag/unflag links; more specifically, I would like to make the links appear as ...
5
votes
1
answer
2k
views
How do I check whether a node is flagged when it is being deleted?
I'm using the Flags module for some functionality on my site. When a node is deleted, I need to check whether it's flagged or not and take additional action based on that. I've implemented ...
5
votes
1
answer
280
views
Using flags to approve user account
I'm using the flag module to provide my site admins with a simple "Approve Membership" button. When the button is clicked the system automatically associates the new user account with several roles ...
5
votes
1
answer
307
views
View for the user followed by the author of a node
I have installed the Flag module, and I have a view that displays how many followers (flags) an author has. How do I reverse that query, and output how many users that author is following?
5
votes
3
answers
4k
views
How to use the Rules module to flag a node that has just been created?
I need to automatically flag a node after it has been published. All nodes of a certain content type will be flagged.
In order to solve that problem, I have installed the Rules module hoping that I ...
4
votes
3
answers
7k
views
drupal_add_js within AJAX callback
How can i add some data to drupal setting object using drupal_add_js withing some ajax callback?
For example I have ajaxified flag link on my page, and have implemented hook_flag in my module, how ...
4
votes
2
answers
222
views
How to remove content from view once user clicks on it (or reads it) in drupal 7?
I have a view "Recent content of your interest" based on taxonomy and flag.
Current scenario:
User clicks on content from view and reads it, he comes back to same view.
What I want:
User clicks on ...
4
votes
1
answer
930
views
Drupal 8 - How to Reference Flags Twig Template without showing full content?
I'm using Drupal 8 to construct a page, where flags are required for Adding Videos to Favorites. I am using the Flags Module, but it's a custom template, so I didn't use the {{content}} reference ...
4
votes
2
answers
155
views
How to create missing rules event when user flags a statuses updates?
The problem:
Rules events are missing. EVENT 1. user flagged a statuses and EVENT 2. user flagged a fbss_comment. Everything is available, just need to add these events. Status updates are created ...
4
votes
4
answers
1k
views
Give flagged products in search API a higher search score?
I have a product catalog running on Search API and Search API SOLR Search. Now I was hoping that when a customer flags a product (with the flag module), there would be a way to boost the search score ...
4
votes
1
answer
72
views
How to select a particular user role which could be flagged
There are two Roles:
Authenticated
Artist
I have created a flag with flag type "USER".
The flag is used so that the Authenticated Users can follow the Artists.
As the flag is type of user, an ...
4
votes
2
answers
3k
views
How to debug a rule that doesn't want to fire?
I have nodes that can be flagged with a global flag.
When a node is updated I want a rule to unflag that node.
Rules Event: After updating existing content
Rules Action: Unflag a node.
I then select ...
4
votes
2
answers
1k
views
Flag module not joining flagging with EntityFieldQuery?
I'm using EntityFieldQuery to pull nodes based on a flag created with the Flag module (3.2):
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->...
4
votes
1
answer
486
views
How can I retrieve the value of a field in a flagging?
I have a global flag, spam, that has a textfield, reason, attached to it.
According to the Flag API documentation, I know I can check whether a user is flagged like this:
$spam && $spam->...
4
votes
2
answers
3k
views
How to redirect a user to previous page after successful login?
I have added flag links to content pages for anonymous user. When user clicks on that link, the user should be redirected to user login page but after successful login the user should be redirect to ...
4
votes
2
answers
1k
views
How can I update a user flag in rules?
I am using a user flag, Visits, to track each user's visits to other user's profiles.
When a user visits another user's profile, a rule is triggered that automatically flags the visited user on ...
4
votes
1
answer
3k
views
Drupal 7: notify user module recommendation
I'm trying to figure out what the best solution to a project requirement is. The basic premise is that a site needs to have a notify user feature - similar to how Facebook works.
A listing in the ...
4
votes
2
answers
1k
views
how to put "add friend" link with flag friend with views
Flag Friend Add Friend Link with views. Flag friends shows a link to add friend in my account page but i want to display this link on in a field for a view.
4
votes
1
answer
2k
views
Only admin can see bulk operations in view
I have a view that includes bulk operations that involve flagging (Flag module) or unflagging nodes. I originally created this in Drupal 6 for another site and have been using it for several years. ...
4
votes
3
answers
3k
views
Restrict forum access based on user (user list)
I need to restrict access to forums so that only selected users can access an individual forum. (The users should apply for a forum and a moderator should decide if the user should be allowed to ...
4
votes
2
answers
168
views
How to create a read-only flag that can only be used by an admin to actually flag nodes?
Long story short, I installed Flag because Best Answer was not working properly. Is it possible to configure flags so that only the admin can flag something (aka an answer as being approved) but ...
4
votes
1
answer
2k
views
Convert a Flags Link into a Checkbox
Is there a way to convert Flags links into check boxes within a view? I tried the Flag Form module, but it did not work (at least not in a view). I've reviewed the Flags Add Checkboxes as Display Type ...
4
votes
1
answer
2k
views
Like / Dislike Button
I need to like AND to dislike contenttyps, but the total likes should be displayed as Likes - Dislikes. I tried to use the "flag" module and created two different flags (one for likes, one for ...
4
votes
2
answers
2k
views
How to display flags to anonymous users and redirect to login after clicking a flag?
I want to display flag to anonymous user and upon clicking the user should be redirected to register/login page.
I found one answer to this problem in the question about
"How to display a flag to ...
4
votes
1
answer
241
views
How can I implement a flag module with caches but won't affect cache the flagging nodes?
According to a post here, I have installed flag module to implement product comparison. However I found that the CPU usage is very high 80-90%, then I tried to install boost and Views content cache to ...
4
votes
0
answers
446
views
Node access user reference
Main Modules:
Node access user reference
Node access node reference
Flags
Rules
I'm trying to give access to a user that clicks on a Join Project flag link.
I have a User Reference Field attached ...
3
votes
2
answers
3k
views
How to programmatically create a flag?
How do you programmatically create a flag in drupal 6? I wish to capture this in code so that I can stage flags between different environments. The current stable release of flag does not support ...
3
votes
1
answer
4k
views
User flagged nodes in views
I'm using the flag module with Views. I need to display all the nodes a user has flagged. This is quite similar (point.3) View of users flagged by a user, users flagging a user, and nodes from users ...
3
votes
1
answer
2k
views
How to change the labels TRUE and FALSE of a boolean field in views exposed filter
I am using the flag module to toggle a node type 'Task' as Done.
I made a view that lists the tasks, and added a views exposed filter for the flag status, which is a boolean field.
In this way users ...
3
votes
2
answers
673
views
Flags - Recreate the 'poke' function
I need to create a flags view that displays a list of users that have "poked" the current user with D7, Views 3 and Flag 3. I've read through this question and drupal.org/node/296971, neither ...
3
votes
3
answers
861
views
Drupal 7: mark as offensive flag
I want to create a 'mark as offensive' flag for my site. However, I have no idea how to go about it. Is there a tutorial on the web that will guide me through the process?
3
votes
1
answer
354
views
How can I write into a Flag's custom field programmatically?
I successfully managed to save a flag programmatically in Drupal 8 thanks to this help but I cannot manage to save data into a custom field I added to the flag entity.
The following code saves the ...
3
votes
1
answer
2k
views
List of certain user flagged nodes in a view
I'm using Drupal 6.28 latest views and flag modules (for drupal 6 ofc). I have a node content type "group" which can be flagged. So I'm user with id2 I'll go on node/10 and flag it, then I'll go on ...
3
votes
1
answer
2k
views
How can I get flag count of a flag?
I see extensive Drupal 7 documentation for the Flags module, but very little for Drupal 8.
I have a Signup flag on a Drupal 8 node (which is an event). I need to suppress the Signup link when a ...
3
votes
1
answer
353
views
How to redirect user to an url when node is flagged?
My problem is related to the Drupal 8 versions of these two modules: rules and flag.
What I want to achieve
Some node types on my site are offering a global flag as a link (for e.g. "report error" ...