Popular Content

Showing content with the highest reputation since 11/14/2018 in all areas

  1. 1 point
    It migrates the social groups data into group collaboration. It was provided for people who upgraded from that app to GC.
  2. 1 point
    Schedule the custom action to run one time (not bulk) and it will allow you to input the member to run it for.
  3. 1 point
    Well, I fixed the permission bug first which made the search empty, so I removed that.
  4. 1 point
    Another way would be: $post = $content->comments(1,0); The IPS\forums\Topic object model has the following core method on it: /** * Get comments * * @param int|NULL $limit The number to get (NULL to use static::getCommentsPerPage()) * @param int|NULL $offset The number to start at (NULL to examine \IPS\Request::i()->page) * @param string $order The column to order by * @param string $orderDirection "asc" or "desc" * @param \IPS\Member|NULL $member If specified, will only get comments by that member * @param bool|NULL $includeHiddenComments Include hidden comments or not? NULL to base of currently logged in member's permissions * @param \IPS\DateTime|NULL $cutoff If an \IPS\DateTime object is provided, only comments posted AFTER that date will be included * @param mixed $extraWhereClause Additional where clause(s) (see \IPS\Db::build for details) * @param bool|NULL $bypassCache Used in cases where comments may have already been loaded i.e. splitting comments on an item. * @param bool $includeDeleted Include Deleted Content * @param bool|NULL $canViewWarn TRUE to include Warning information, NULL to determine automatically based on moderator permissions. * @return array|NULL|\IPS\Content\Comment If $limit is 1, will return \IPS\Content\Comment or NULL for no results. For any other number, will return an array. */ public function comments( $limit=NULL, $offset=NULL, $order='date', $orderDirection='asc', $member=NULL, $includeHiddenComments=NULL, $cutoff=NULL, $extraWhereClause=NULL, $bypassCache=FALSE, $includeDeleted=FALSE, $canViewWarn=NULL )
  5. 1 point
    This recipe adds a custom data field to forums which can be used to make topics posted in the forum automatically expire after a set number of hours. A custom action is used to schedule the locking of the topic at the given time. This recipe could easily be tweaked to extend the scheduled lock time if the topic author re-posts or under some other condition. auto-expire-topics.xml
  6. 1 point
    It is fairly common to have an action or set of actions that you would like to perform on a piece of content (or member) only after a certain amount of time has elapsed between particular events. For example, you might want to: Close a topic automatically a certain amount of time after it was created. Move a topic to a different forum if it hasn't been posted in for a certain amount of time. Send members a polite follow up email if they haven't logged in for a specified period of time. There is a simple pattern that you can use in all of these cases, which isn't so obvious to those that are new to rules, but is very easy to implement once you understand how it works. Why does this work? It's in the keyphrase. Let's take a look at example #2 above. We want to move the topic if it hasn't been posted in for 3 weeks. So what we do is to create an action to move the topic to the new location, and schedule that action for 3 weeks in the future instead of executing it immediately. This way each time a post is made in the topic, the move gets rescheduled. It's important to use a keyphrase that will be unique to that topic, so we must include a token in the keyphrase such as the topic id. It could look something like this: "Move topic [content:id] to graveyard". Of course, the token that corresponds to the id of what you are trying to move will depend on the event that you are writing your rule for, so make sure to look at the tokens list to see which token corresponds to your content id. But the concept is pretty simple. With every post, we assume that it is going to be the last post that happens... and we schedule the future action for the set amount of time in the future. If another person posts in the topic, we simply schedule the future action again which removes any previously scheduled follow up action with the same keyphrase, and sets in motion the new follow up action. This way the only follow up action that is in motion for the topic is the one which was scheduled after the last time the chosen event occured (in this case, it's when a topic comment is posted). If no qualified event happens within the timeframe between the last action and the follow up action which causes the follow up to be rescheduled, then the follow up action executes and the cycle ends.