Questions tagged [flags]

Use it for the module implementing a flexible flagging system, completely customizable by the administrator users: the Flag module.

Filter by
Sorted by
Tagged with
0
votes
1answer
405 views

Set node to flagged by default

I'm using flags on my site as a way of filtering content through views, when a user views a certain node content type, I have a rule setup which resets the value of my flag and sets it against that ...
3
votes
2answers
337 views

How to add a 'flag link' in an email?

I want to add a 'flag link' in an email. I have an event content type, and every time a new event created, the users get an HTML Email. I have a flag that the users can flag this event if they want to ...
0
votes
1answer
68 views

How to print in twig a Flag Link field

I have a views-view-unformatted.html.twig template working fine where I can print fields from a view of nodes. Example: having i = 3, print row number 3 title {{ rows[i]['content']['#row']._entity....
0
votes
0answers
20 views

Flags are only temporary?

I have a feed that imports content items and a view that selects three of them for a block on the site front page (links are on the node to set flags). But when I turn off my localhost test site and ...
1
vote
2answers
490 views

How to use the flag counter in a twig template of a node?

The version dev of the module "Flag" for "Drupal 8" has added a new sub module "Flag Count": https://www.drupal.org/project/flag/issues/2708291 I copied the code {% set count = '[' ~ flagcount(flag,...
1
vote
1answer
419 views

Assigning a badge to a user using Flag, Badges and Rules

I am interested in assigning to user a Badge after he favourites 3 nodes. I want to do this with Flag, User badges and Rules. How can I do that?
4
votes
1answer
425 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 ...
2
votes
2answers
436 views

How do I send notifications for followers of a group when group content is updated?

I want to build such functionality that allow the user to follow the other users, and when the followed person is updating the information, the follower can get notified for what they are doing. I ...
0
votes
0answers
12 views

Entity Reference selection: Nodes by Author available to flagged Group

I've looked at both Organic Groups and Groups and they don't quite work for me, so I'm trying to do my own thing. Here's the setup... Contributor (user type) requested/invited to Group (content type)...
2
votes
1answer
31 views

How to exclude views fields from display when a node is flagged

We use the flag module to mark items that will have delays in shipping so that the customer knows that those items will be delayed before adding them to cart. In drupal 7, we excluded our "add to cart"...
0
votes
0answers
11 views

How can I allow only one flag per matching field value within a view?

I have a view that allows users to flag nodes directly through the view, I'd like to limit it so that can only flag one item per category at a time. For example: VIEW Category 1 Node A ...
1
vote
1answer
746 views

Is there any way of removing (or unflagging) all of a user's flags?

I have a situation where a privileged user (role that is purchased) can flag content and receive email notifications to comments posted. When the role is expired, I need for them to stop receiving ...
1
vote
3answers
922 views

“[node:flag-vote-count]” displays the token name, not the number

I have a problem in the Flag module with the [node:flag-vote-count] token. I googled for a solution, but I couldn't find one. On my content page, the Flag module displays the token name (i.e. [node:...
3
votes
1answer
1k views

Displaying Content Flagged by User Name with Flag Module

I'm using Drupal 7.38 with the Flag (v7.x-3.6) module, along with Views. I'm setting up a flag for content. My goal is to display a list of users whom are flagging content (along with aggregated ...
3
votes
3answers
848 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?
0
votes
0answers
37 views

How to add a token with the flag to the Message module?

I have a site on Drupal 8 with the Message, Flag and Token modules. I created a custom module to create a message when an entity is created on the site. I also created a flag to mark messages as ...
1
vote
1answer
212 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 ...
0
votes
0answers
33 views

How do I programmatically get the flag creation time?

I need to get the creation time for a flag on a node. I started with the following code, but I probably need to use getEntityFlaggings() passing the node and the flag ID. $flag_service = \Drupal::...
0
votes
0answers
25 views

Flag/Unflag Taxonomy term when updating Taxonomy field in user profile

I asked this question a few days ago: Send email to all users that are tagged with the same tag a node is when created I decided to go a different route and use the flag and rules module to associate ...
0
votes
0answers
33 views

How to limit flagging in drupal 8?

Node compare is awesome plugin but it's just only in D7. I'm using Drupal 8. I have a views page which integrated with flag(compare it) and flipped table module to compare contents. It has limit to ...
1
vote
1answer
307 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 ...
0
votes
0answers
32 views

Get the field for a value of a “List (integer)” field using entity_load()

I am trying to get the label for a value of a List (integer) field using entity_load(). With the code I am using, I'm able to get the field key with $flagging->field_form_status['und'][0]['value'],...
1
vote
1answer
15 views

Node is flagged, node author comes back to the site, how to show how many new flags since last visit?

I created a "new activity feed" view page in which a user can see how many new comments have been posted to his own nodes since his last visit Eg : since you last last visit : - 21 new comments have ...
0
votes
1answer
621 views

Can't get Flagging API to accept POST request

trying to use the REST API that comes with the flagging module on Drupal 8. I've enabled and secured the endpoint that comes with the module: /entity/flagging: POST I'm nearly there, but following ...
5
votes
6answers
4k 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 ...
2
votes
2answers
96 views

Is there a way to add non indexed fields to a search api view?

I’m wondering if it’s possible to add non-indexed fields to a search API indexed view? I want the standard flags fields to be available on the indexed search view. And I was thinking I could do this ...
-4
votes
2answers
129 views

How to redirect user to login page when anonymous user click on the flag link?

Redirect user to login page when anonymous user click on the flag link. How to achive this? I have created flag links by function MYMODULE_preprocess_node(&$variables) { $node = $variables['...
0
votes
1answer
49 views

Rules Flag Count

I have added a flag [FOLLOW] that allows users to follow each other. Using Display Suite, I am trying to add a token field that will count total number a FOLLOWS a user has received. From what I can ...
0
votes
1answer
32 views

Disabling node editing after first node flagging

I use flagging for signing petitions. Petitions should be editable until the first signing (flagging) is done. Now I look for a solution to disable node edition after first signing. My first thought ...
0
votes
1answer
18 views

Error when trying to delete user

I installed the heartbeat module to track user activities on my website. It took me hours to configure it but everything seemed to be working as I wanted until I tried to delete a test user from the ...
2
votes
1answer
231 views

View, flag, and followers

I have a user flag that is called "follow" and am trying to setup the following views in Drupal 8. I want to create 3 views for my website's user profile pages: A list of users flagged by a user (...
0
votes
0answers
67 views

Rules, Flags, Follower and New Content Notification

I am trying to setup a couple of rules. So far I have messed with rules some but since I am new, haven't had any success. This is what I am trying to achieve. Have created a user flag called FOLLOW. ...
0
votes
1answer
797 views

How can I flag (follow) user by REST API using service resources?

I am using flag module to have the following user function. So that the followers will be able to read the blog of the users that they followed. Now I want to provide api for mobile application, when ...
0
votes
1answer
198 views

Token for Total Flag Count

I have created a flag for my comments named HELPFUL. If users find a comment helpful they vote it as such. The challenge that I have is how do I show the total votes for the flag next to the button? ...
1
vote
1answer
126 views

How to show users who have not flagged a node with any flag?

Drupal 7. I have a content type that can be flagged with 3 different flags. I need to display a view of users who have not flagged any of them. The users that are allowed to flag are listed in an ...
0
votes
0answers
172 views

Flag count is incrementing only after page reload

I have a views with like and unlike flag. When I click on like flag the count not increments. But when I reload the page, then only like's count will change. How can I solve this issue? Note: I have ...
2
votes
1answer
33 views

How to stop users from flagging other users if they have a custom taxonomy term?

I'm working on a project where users vote other users using the Flag module. Each user has a department term reference field. I would like to stop a user from flagging another user if they have the ...
4
votes
2answers
136 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 ...
1
vote
1answer
148 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" ...
3
votes
1answer
74 views

How to use “replacement tokens” created for a Message type in Views?

In my case a user with the role ("team member") flags a node created by normal user. I want to display "@team member_id flagged @node_id created by @user_id". Maybe later on I would like to add ...
2
votes
1answer
82 views

How to send a message notification based on a flagged node being linked via entity reference?

I'm trying to figure out how to make the following work: Sending notification based on flagged node being linked via entity reference. I have a 'News' content type and a 'Band' content type, that has ...
1
vote
3answers
453 views

How to unflag all messages when a users visits the Message page?

I am using the Message module in combination with the Flag module in order to build a simple notifications system for my site. More specifically I have created a page in Views showing all (new) ...
9
votes
3answers
4k 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 ...
1
vote
1answer
197 views

How get subscribe to user flag on a node

I have a node for example news I have Message module installed I've enabled the flag subscribe to user I want people to be able to subscriber to a user. To get updates on thier latest post. I want ...
1
vote
1answer
108 views

Flag module integration with Message module

I am using Rules, Message, Message Notify and Flag modules. I added a message to the activity stream when user flags a node as "Favorite". My problem is I am getting notification, but the node that ...
1
vote
0answers
82 views

How do I use the message module with the flag?

On Drupal 8 I installed the "Message" and "Flag" modules. I created a flag "Report content" and I want a message to be sent to the site administrator as soon as a content is reported. Messages will ...
2
votes
2answers
228 views

How to create a User Feed using the modules Message and Flag?

What I'm trying to do is in theory easy : **User** flagged **Article**. But I'm having hard time figuring out how to build a user feed like this with Message and Flag modules. I looked a little bit ...
1
vote
1answer
370 views

How to show message view containing own and following activity?

I have created a message view using the Message module. I want this view to show the current user activity and activity of the user he is following using the "follow" flag (user). i.e own + following. ...
2
votes
1answer
271 views

Which user related token(s) can be used to create a Rule for setting up a message type?

I have created few activity logs using the Message module. All works ok, but when I try to create a message type for example "username started following you on github". When setting up the rules for ...
0
votes
1answer
33 views

Showing flagged content to users

I have flagged contents in a block.But only admin can see the these flagged contents(contents are product variations).I want to show these contents to all authenticated users and anonymous users.Is it ...