Jump to content

IPS Rules Application


Recommended Posts

Posted
2 hours ago, Joel R said:

Hi, do you know if the Rules App creates a database table for rules_arguments?

If so, I have a corrupt database that needs to be manually fixed.  See image below for error.  

support-103187-0-99744900-1443325321.png

Its not corrupt. But if you want that message to go away, just update to the latest rules version.

Posted

:cry:

 

On 31/05/2015, Kevin Carwile said:

Rule: Redirect new members to edit profile

  • Event: Member logged in to system
  • Conditions:
    • Member attribute values (Member has joined within the last 24 hours)
  • Actions:
    • Redirect to another page (Redirect to the members profile edit page)

 redirect-new-members-to-edit-profile.xml

I understand the rule( I think) but why is there a link to that xml file please?  What am I supposed to do with that file? Should I be uploading it or something?

Posted
1 hour ago, kar3n2 said:

I understand the rule( I think) but why is there a link to that xml file please?  What am I supposed to do with that file? Should I be uploading it or something?

Its an exported rule from the rules app. You can import it from the rules ACP.

Posted

I think I must have done something wrong maybe. I have a rule set to add an inline message "welcome back ( name)" to a member on return logging in.  However it doesnt do the message.

I have it set to debug to see what might be happening but that says Rule evaluated ...Conditions met... so I presume that means that it created the inline message ok. So any ideas why member cannot see the message?

Thanks if you can help

Posted
1 hour ago, kar3n2 said:

I think I must have done something wrong maybe. I have a rule set to add an inline message "welcome back ( name)" to a member on return logging in.  However it doesnt do the message.

I have it set to debug to see what might be happening but that says Rule evaluated ...Conditions met... so I presume that means that it created the inline message ok. So any ideas why member cannot see the message?

Thanks if you can help

Yes, I know why. IPS core is designed in such a way that inline messages are lost if you set one and then the page view results in a redirect.

I planned on creating a workaround but never got around to it. 

Version 1.3.0 of rules is in the works. I'll see if I can toss this in.

Posted

You can flush the rules_scheduled_actions table from phpmyadmin. Or, if you set up your scheduled actions with a keyphrase, you can create a custom action and a rule to delete scheduled actions by matching the keyphrase.

Posted (edited)
7 minutes ago, Kevin Carwile said:

You can flush the rules_scheduled_actions table from phpmyadmin. Or, if you set up your scheduled actions with a keyphrase, you can create a custom action and a rule to delete scheduled actions by matching the keyphrase.

I cant find rules_scheduled_actions and the rule was member re-engagement and had no keyphrases

EDIT: Found it... sorry.. will flush it now

Edited by HippieDude
Posted
11 minutes ago, kar3n2 said:

@Kevin Carwilewhen I get a notification that you have uploaded new version am I supposed to download that again and upload it to my site?  ( probs silly question but just checking)

Yes. It's always a good idea to stay updated. And I've included a fix for the inline message issue you reported, so it will definitely benefit you.

Posted
Just now, Kevin Carwile said:

Yes. It's always a good idea to stay updated. And I've included a fix for the inline message issue you reported, so it will definitely benefit you.

oh thanks Ill let you know how I get on with that   :huggles:

 

Posted

 

9 minutes ago, Kevin Carwile said:

Yes. It's always a good idea to stay updated. And I've included a fix for the inline message issue you reported, so it will definitely benefit you.

I just tried it... "Welcome back to returning member"........had to be quick to copy the message though ( after 4 tries finally caught it ha ha ) In the debug it said it worked with conditions met  and there was a drop down message but it only had a long number in instead of saying welcome back ( name)     daf0b221ed3d59a5cb47230d04d6a8d8

Posted
6 hours ago, Fabby said:

Any way to make an action only be done once a day or 24 hours ?

Yes, set it up as a custom action and then schedule itself again in 24 hours everytime it runs. Or you can schedule it manually from the custom actions ACP page (as recurring) if you want to pass it the same arguments each time it runs.

Posted

    {{$data = $object->ets2avatar;}}
    <strong>Data:</strong> {$data}

Trying to load this simple custom data (set to member)

Basicly trying to achieve that members can set a url (or prefered upload) as second avatar which i then can show on a pages database record.

Posted
55 minutes ago, Fabby said:

    {{$data = $object->ets2avatar;}}
    <strong>Data:</strong> {$data}

Trying to load this simple custom data (set to member)

Basicly trying to achieve that members can set a url (or prefered upload) as second avatar which i then can show on a pages database record.

You need to access the data field from the member object then. $object is just an example but is likely not defined in your template. Try using the variable which holds the member object for the template you are working with.

Posted

That won't work either.

I'm trying to get members to be able to set their own link or image one time in their profile and then to show it on a custom page database but it won't do that somehow. Any way this is possible?

Posted
11 minutes ago, Fabby said:

That won't work either.

I'm trying to get members to be able to set their own link or image one time in their profile and then to show it on a custom page database but it won't do that somehow. Any way this is possible?

Very doable. But without really knowing exactly what template your working with and what variables are available inside it, I can only speak in generalizations.

I'm guessing that you want to show the custom member data of the author of the database record, in which case you will probably need to use $record->author()->ets2avatar

Posted

That worked flawless! This explains so much why things didn't work for me. Is it possible as well to show a custom profile field of IPS system itself anywhere else to?

Posted
8 hours ago, Fabby said:

That worked flawless! This explains so much why things didn't work for me. Is it possible as well to show a custom profile field of IPS system itself anywhere else to?

You can do that if you want, but its not nearly as easy as using rules custom data. You'll need to look into core api methods such as \IPS\Member::profileFields to get at that data. 

Posted

@Kevin Carwile

Kevin - could you give me an example use of the Custom Log facility - I see documentation is not ready as yet. For instance to create a log of overtime a member logs in to our site - how would this be achieved please or is this not its purpose?

Posted
6 hours ago, Police Community said:

@Kevin Carwile

Kevin - could you give me an example use of the Custom Log facility - I see documentation is not ready as yet. For instance to create a log of overtime a member logs in to our site - how would this be achieved please or is this not its purpose?

Yes, I need to find time to create some documentation for that. But basically, it can be used for all sorts of things. I know of a user who wanted to log changes made to the copyright field of images. For me, I needed a way to log time spent on project management tasks on ipsguru. But theoretically, it could be used to log achievements to a user, or milestones to a topic, or moderation actions in a forum, or.... whatever you want to keep a log of.

In your instance, I'm not exactly sure what you mean by "overtime a member logs in", but the process is basically the same for any log you want to use.

  • Create the log in the Rules ACP under "Custom Logs" attached to whatever system entity (member, node, content) the log will be tracked to.
  • Add any additional log data fields you want to show in the log by adding "Log Arguments".
  • Through your own devised rules, simply add the action to add a log entry to the log in question whenever it is appropriate.

As an example:

On IPS Guru, I have a pages database for "tasks" that I use to track activity on specific tasks for custom projects. Through pages, I have a radio field that has two options for the task "In progress" and "Task Idle". I have enabled this database for collaborative use so that I can create tasks inside of collabs.

Via rules, I have added a custom integer data field to the "task" content type. So with rules, I set the current date/time timestamp when the task is updated to "in progress", and then calculate how much time was spent on it when the task is updated again to "task idle". I create a log for the task when the session is started, and when it is ended and have added a couple custom log arguments so that I can log the total time for the session, and an overall time for the task. Works pretty good for my needs.

Posted
7 hours ago, Kevin Carwile said:

Yes, I need to find time to create some documentation for that. But basically, it can be used for all sorts of things. I know of a user who wanted to log changes made to the copyright field of images. For me, I needed a way to log time spent on project management tasks on ipsguru. But theoretically, it could be used to log achievements to a user, or milestones to a topic, or moderation actions in a forum, or.... whatever you want to keep a log of.

In your instance, I'm not exactly sure what you mean by "overtime a member logs in", but the process is basically the same for any log you want to use.

  • Create the log in the Rules ACP under "Custom Logs" attached to whatever system entity (member, node, content) the log will be tracked to.
  • Add any additional log data fields you want to show in the log by adding "Log Arguments".
  • Through your own devised rules, simply add the action to add a log entry to the log in question whenever it is appropriate.

As an example:

On IPS Guru, I have a pages database for "tasks" that I use to track activity on specific tasks for custom projects. Through pages, I have a radio field that has two options for the task "In progress" and "Task Idle". I have enabled this database for collaborative use so that I can create tasks inside of collabs.

Via rules, I have added a custom integer data field to the "task" content type. So with rules, I set the current date/time timestamp when the task is updated to "in progress", and then calculate how much time was spent on it when the task is updated again to "task idle". I create a log for the task when the session is started, and when it is ended and have added a couple custom log arguments so that I can log the total time for the session, and an overall time for the task. Works pretty good for my needs.

Sorry Kevin that should have said every time a member logs in as a login log - predictive text grrrr

Posted
9 hours ago, Police Community said:

Sorry Kevin that should have said every time a member logs in as a login log - predictive text grrrr

Create a log attached to members, and then add an entry to it from a rule assigned to the member logged in event. Simple as that.

Posted

Hello,

I have a couple of questions:

1. I would like to start using the Rules Application for synchronizing the Collab content with Forums and vice versa, so that each time users add topic to Collabs/forums they are copied to certain regular Forums/forums as well and vice  versa - Each time users contribute to certain Forums/Forums the topics are copied to dedicated Collabs/Forums. Is it possible?

2. Is it possible for existing topics as well? So that I run an instruction to do the above for certain existing Forum/Forums and Collab/Forums?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...