Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
November 27, 20177 yr Author I see your sticking point. The form is asking for the topic which you are attempting to update the custom data for (which is the stock action I referred to). But unless there is an explicit topic in the event arguments, how could rules give you an option to choose from? In this case, not just topic comments can be reported, but all sorts of other content can be reported. It cannot be assumed that you can derive a topic in from any given piece of reported content. If I report a comment on an image, and that rule event is invoked, how is rules going to get a topic from that comment? It's undefined. This is why you only have the option to use PHP code to provide the topic for which the stock custom data update action will operate on. Rules knows that it cannot know what topic to use. Therefore you must tell it. You could put a condition on the rule that checks if the content is an object of the 'IPS\forums\Comment' class, which would ensure the rule only runs when a topic comment is reported. This will prevent errors when other types of content are reported, but you are still left with the need to provide the topic itself for the custom data update action. You need to return the topic from your PHP snippet: return $content->item();
November 27, 20177 yr return $content->item(); This returns an error unfortunately: Result: "Incorrect entity class (IPS\\forums\\Topic). Expecting IPS\\forums\\Topic\\Post<br>Line: 209 of CustomData.php"
November 28, 20177 yr Author Oh, if you need a Topic\Post, just return the $content then. I thought you needed the topic.
January 9, 20187 yr Oh, if you need a Topic\Post, just return the $content then. I thought you needed the topic. Hey Will you please consider adding an action that removes reputation points from a user, so i could have a function thats IF member gets warned Remove X reputation from member would be awesome
January 9, 20187 yr Author Hey Will you please consider adding an action that removes reputation points from a user, so i could have a function thats IF member gets warned Remove X reputation from member would be awesome The main problem is that reputation is not a bank that you can add to or remove from. It is a tally of reactions to content and therefore is a mathematical function. So adding reputation is not as simple as incrementing a counter. It requires a reaction to be made on a piece of content. It can't simply be arbitrarily added or removed.
January 12, 20187 yr The main problem is that reputation is not a bank that you can add to or remove from. It is a tally of reactions to content and therefore is a mathematical function. So adding reputation is not as simple as incrementing a counter. It requires a reaction to be made on a piece of content. It can't simply be arbitrarily added or removed. How are apps like this able to exist then - It has a reputation altering "item" We are also able to edit reputation through ACP Not saying you are wrong - but im rather genuinely curious cheers
February 8, 20187 yr Urgent: Is there a way to flush the scheduled actions? I had enabled the re-engagement mails, but it has added multiple messages per member. They have no key, so I am guessing that is why they have not been being deleted. Now I have 84 pages of scheduled mails being sent out which is pissing members off. I see no way to clear this queue via admin.
February 9, 20187 yr Author Find the rules_scheduled_actions table in your database and delete all the entries.
February 9, 20187 yr Urgent: Is there a way to flush the scheduled actions? I had enabled the re-engagement mails, but it has added multiple messages per member. They have no key, so I am guessing that is why they have not been being deleted. Now I have 84 pages of scheduled mails being sent out which is pissing members off. I see no way to clear this queue via admin. Thanks Kevin. Do you plan to add a "flush scheduled actions" button in the future?
February 18, 20187 yr Since I moved 70% of my content to clubs, most of the rules dealing with topic creation/modification can not apply anymore. The reason is that I can't specify an action when a member creates a topic in an specific forum inside a club. Are there any plans to update the club topics ?
February 20, 20187 yr Author Since I moved 70% of my content to clubs, most of the rules dealing with topic creation/modification can not apply anymore. The reason is that I can't specify an action when a member creates a topic in an specific forum inside a club. Are there any plans to update the club topics ? Yeah, it's called Group Collaboration. You can find it in the marketplace.
April 12, 20186 yr hey @Kevin Carwile I have a custom database and I'm trying to add the record ID that is created as a tag. I currently have this and it's not working: https://gyazo.com/3256d74ef951d128afb1f6e7bae1f21d Any ideas? Edit: I see I can use [content:id] - The content ID in the replacement tokens, but how would I go about adding that as the tag? Edited April 12, 20186 yr by Wildcard Chris
April 13, 20186 yr Author I dont think that primary id field is a method on the record. I think it is just a property.
April 13, 20186 yr I dont think that primary id field is a method on the record. I think it is just a property. So any idea how to grab the content id or record id in the custom php field?
April 13, 20186 yr Yeah. Dont use it as a method call. Like... remove the parenthesis. I don't have a parenthesis anywhere? I'm using: //<?php $record->primary_id_field; return;
April 13, 20186 yr Author Well I dont know then. You cut all the important clues out of the screen shot you provided such as the event and the available variables to your php code.
April 13, 20186 yr The event is when a record(report), in the pages system, is created: https://gyazo.com/d022b4208013708c9f8b59dc1840a373 Edited April 13, 20186 yr by Wildcard Chris
April 13, 20186 yr Author In the bottom description of that php code editor it shows that the variable that holds the record is named $content. Try using that one.
April 13, 20186 yr In the bottom description of that php code editor it shows that the variable that holds the record is named $content. Try using that one. It's not working. Is there a way I can use these in the custom php section? As then maybe I can use [content:id] https://gyazo.com/1485e4c5adc66de9c27f93796075ed86
July 4, 20186 yr Hi I am trying to give an award to all members that are registered since 1 year. But there does not seem to be an option to create a date of at least 1 year but only wihtin 1 year? My goal is to give an award every year so 1 year Membership 2 year Membership and so on? Update: so I have done it like this so far.. but the rule is not actually doing anything? Rule: Logged in Event: Member logged in to system Conditions: NOT Member attribute values (Join date) (This is set to NOT within 1 year) Actions: Give an award to a member (1 year Membership) Thank you Edited July 4, 20186 yr by Doped_Wizard
July 24, 20186 yr Hey! I'd like to be able to add a class to the body tag depending on the forum being viewed. To achieve this I was thinking of adding a custom data field called class to each forum and then inserting the field using template tags into the class attribute of the body tag in globalTemplate. Although I am not sure if the forum data field would be in scope at that point. Would this be possible using IPS Rules Application? Happy to buy the full version if that's needed. Many thanks
July 25, 20186 yr Author @christopher-w That seems like it should work. But the global template is used on all pages, not just forum pages, so that template will not have a reference to any particular forum to grab the custom field value from. My suggestion would be to find a template which is used by the forums app and insert the class in a wrapper element from that template. Otherwise, getting the forum reference to access the custom data field is going to be much more difficult.