Jump to content

Kevin Carwile

Clients
  • Posts

    1,237
  • Joined

  • Last visited

  • Days Won

    9

 Content Type 

Profiles

Downloads

IPS4 Providers

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Forums

Store

Everything posted by Kevin Carwile

  1. However you want? My initial thought would be to create a custom data field for members that you can use to manually set a maximum number of pips a member can earn. Then wherever you award pips, writ another condition to make sure they arent going over the limit. Maybe something like that would work.
  2. There is a enable/disable option in the dropdown menu also.
  3. I believe you may be missing the update_check url from your database for the collab app. I dont know why that would be... but thats my best guess at what might cause that error.
  4. What version of collab do you have?
  5. Just hide the collab like any other content item.
  6. You could do a number comparison on the profile field of the member.
  7. Rules cant do a modal popup. But you could attempt to catch the page view and redirect. But then you could also control access to the form by member group also. That might be better.
  8. Not really possible I dont think. You can perform the check after the form is saved, but you can't do on the fly form validation like that.
  9. If it is for 5 different members, yes.
  10. Right. But I meant how do you tell the framework that you have a mixin file that needs to be included in the javascript bundle. So I guess that it is scanned and included automatically. Because that's not the case with controllers. You actually have to add a javascript bundle to the output stack for those.
  11. Um, what errors? Talk to me via PM if you want to get things straightened out.
  12. How do you trigger mixins to be added to the page from php?
  13. The lite version of the app is available as a free download. No demo site except your own.
  14. A rules extension. Its what rules was built for.
  15. How are javascript mixins used? Currently no docs on them that I can see. I've found a need to overload/modify a method on a core javascript controller. Can mixins be used for this?
  16. I see. So how many rows do you have in your rules_rules table?
  17. What tables dont have indexes? Which queries are slow?
  18. Try creating a custom action to check for the sold prefix on the topic and close it, and then trigger that custom action from your rule when a "topic has been created or updated". And make sure to set the action execution to the "end of page load" setting. I believe the problem you are having is because of a timing nuance. When the topic is created/updated with new tags, then the event actually happens before the tags are saved to the topic in core processing.
  19. That's not so easy. But I'll give you the solution anyway in case you are the adventurous type. The attachments aren't actually "attached" until after the content created/updated events have happened (internal ips workflow thing). So you can't check the condition on a rule attached directly to one of those events because the attachment won't actually have been claimed yet. Also, there is no stock condition to check if a topic or post has an attachment, so it would require a custom php snippet to do that. So... for the solution: You need to first create a custom action which you will trigger from a rule when the content is created/updated and set the action execution to wait until the end of the page load so that the "attachment" can be processed before your custom action is actually fired. And then you would check the condition in your custom action rule. The custom php code portion of the condition would look like this (this means you need to add an argument to your custom action called "Content", which would either be a content item class or a content comment class, and would make $content available to your custom php code): /** * If content being checked is a topic/item, check if any post has an attachment */ if ( $content instanceof \IPS\Content\Item ) { $locationKey = $content::$application . '_' . ucfirst( $content::$module ); return (bool) \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments_map', array( 'location_key=? AND id1=?', $locationKey, $content->activeid ) )->first(); } /** * If content being checked is a post, see if it has an attachment */ else if ( $content instanceof \IPS\Content\Comment ) { $item = $content->item(); $locationKey = $item::$application . '_' . ucfirst( $item::$module ); return (bool) \IPS\Db::i()->select( 'COUNT(*)', 'core_attachments_map', array( 'location_key=? AND id1=? AND id2=?', $locationKey, $item->activeid, $content->activeid ) )->first(); } return FALSE;
  20. I believe the member re-engagement example does this.
  21. You could set up a custom action to roll together the group change and welcome PM (with beta key) into one function. Add a member as an argument to the custom action and also add a string value to the custom action to accept the beta key. When you are adding the standard PM action to your custom action rule, the beta key passed in will be available as a token value to insert into your message. Then all you have to do is trigger your new custom action to perform the group change and send the PM with beta key. When configuring the beta key to send to your custom action, you would choose php code as the source and pull a new beta key from a list somewhere as you stated. That part would be up to you to work out. But lets say that you have a comma seperated list of keys in a text file... you could do something like: $keys = explode( ',', file_get_contents( 'keysfile.txt' ); $key = array_shift($keys); file_put_contents( 'keysfile.txt', implode( ',', $keys ); return $key;
×
×
  • Create New...