Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] auto action time condition for profile update action

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
8 years 11 months ago - 8 years 11 months ago #273992 by jpdenny1
Hello CB, when using the auto action -> system action - 'profile update', is there a way to limit to display on the activity stream according to time e.g. if a user updates their profile 5 times in a row - not to have 5 posts but 1 - say limiting it to 1 update post on activity stream per 24 hour period?

Wondering how to condition this in the auto action. Any ideas?

Found a time related auto action post here: www.joomlapolis.com/forum/153-professional-member-support/231823-autoaction-for-profile-update#273521
but doubt it's the same use.

Basically I like the auto action, it's usful info for moderator et al but don't like the way it's for every update i.e. it's potential frequency within the users or overall special access stream.

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9
Last edit: 8 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #273996 by krileon
Not without a field that can keep track of that so you can condition against it in the auto action. CB Query Field could be used to query for an activity entry for profile update in the last 24 hours and return the activity id. You'd then condition against that in a copy of the profile update system action.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
8 years 11 months ago #273997 by jpdenny1
Thanks Kyle, I saw the field usage condition in the video alright, suspected may have to use a field.

So I definately need a field and in addition a cb query on that field. Unfortunately database queries are beyond me.

Any chance of the query and settings in that tab?Apologies for having to ask, expect the solutuion may be useful to other members also :) due to the amount of potential posts with this auto action.

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago - 8 years 11 months ago #274000 by krileon
The below query should get the id of the last profile update activity for a user in the past 24 hours.

Code:
SELECT `id` FROM `#__comprofiler_plugin_activity` WHERE `type` = 'profile' AND `subtype` = 'update' AND `date` >= ( NOW() - INTERVAL 1 DAY ) AND `user_id` = '[user_id]' ORDER BY `date` DESC LIMIT 1

If it doesn't please adjust as needed as it's just an example. Please understand I am not here to provide custom coding and can not keep providing query or code on request. If you find that your user requires custom coding then please contact a contract developer to write it for you. Specifically for queries you may want to review the MYSQL documentation and tutorials below.

dev.mysql.com/doc/refman/5.6/en/
dev.mysql.com/doc/refman/5.6/en/tutorial.html
www.w3schools.com/sql/default.asp


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 8 years 11 months ago by krileon.
The following user(s) said Thank You: jpdenny1

Please Log in or Create an account to join the conversation.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
8 years 11 months ago #274020 by jpdenny1
Alright thanks Kyle, will give it a go. Really appreciate it as always, sites not live, building it myself on a sharp learning curve.
Aware you don't provide custom so would only ask (lately anyway) if felt it could also help others and the CB experience for all kinds of users. Could have always just unpublished the AA but worth asking anyway. It's a pretty good use case I think :-)

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

Please Log in or Create an account to join the conversation.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
8 years 11 months ago #274035 by jpdenny1
Naturally I suppose I got stuck. I followed Nicks Auto Action condition video tuitorial with what you said. I changed day to minute to test.

Made a field: cb_updatepost24, checkbox single, put in cb query field code as above. (query does go in here?)

Copied System Auto Action, added [cb_updatepost24] not equal to 1.

Made another Auto Action, field type, same as above adding (set field = value) putting at 1.

Obviously the initial field mentioned, the value changes to yes, upon update and the second update doesn't publish. But struggle to see where or how this Yes can go back to No, allowing another post (through what I have set).

I doubt I'm far off, would like to use this, if you have a spare few minutes be great to get the solution (the 'activity id' condition, from what I grasp).

(Congrads on GJ stable!)

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum