| 2197 | | * SITE ACTIVITY FUNCTIONS |
| 2198 | | * |
| 2199 | | * *********************************************************** */ |
| 2200 | | |
| 2201 | | |
| 2202 | | /** |
| 2203 | | * Get the latest site activity |
| 2204 | | * |
| 2205 | | * @param int $limit |
| 2206 | | * @param int $userid |
| 2207 | | * @param string $type blank or "count" or "query" |
| 2208 | | * @return array|false |
| 2209 | | */ |
| 2210 | | public function getLatestActivity($limit = 0, $userid = 0, $type = '') |
| 2211 | | { |
| 2212 | | $activity = new UserActivity(); |
| 2213 | | return $activity->getLatestActivity($this, $limit, $userid, $type); |
| 2214 | | } |
| 2215 | | |
| 2216 | | |
| 2217 | | /** |
| 2218 | | * Check if an action already exists |
| 2219 | | * |
| 2220 | | * @param array $args e.g. array('userid'=>4, 'key'=>'post', 'value'=>'6408') |
| 2221 | | * @return bool |
| 2222 | | */ |
| 2223 | | public function activityExists($args = array()) |
| 2224 | | { |
| 2225 | | $activity = new UserActivity(); |
| 2226 | | return $activity->activityExists($this, $args); |
| 2227 | | } |
| 2228 | | |
| 2229 | | |
| 2230 | | /** |
| 2231 | | * Insert new activity |
| 2232 | | * |
| 2233 | | * @param array $args e.g. array('userid'=>4, 'key'=>'post', 'value'=>'6408') |
| 2234 | | */ |
| 2235 | | public function insertActivity($args = array()) |
| 2236 | | { |
| 2237 | | $activity = new UserActivity(); |
| 2238 | | return $activity->insertActivity($this, $args); |
| 2239 | | } |
| 2240 | | |
| 2241 | | |
| 2242 | | /** |
| 2243 | | * Update activity |
| 2244 | | * |
| 2245 | | * @param array $args e.g. array('userid'=>4, 'key'=>'post', 'value'=>'6408') |
| 2246 | | */ |
| 2247 | | public function updateActivity($args = array()) |
| 2248 | | { |
| 2249 | | $activity = new UserActivity(); |
| 2250 | | return $activity->updateActivity($this, $args); |
| 2251 | | } |
| 2252 | | |
| 2253 | | |
| 2254 | | /** |
| 2255 | | * Remove activity |
| 2256 | | * |
| 2257 | | * @param array $args e.g. array('userid'=>4, 'key'=>'post', 'value'=>'6408') |
| 2258 | | */ |
| 2259 | | public function removeActivity($args = array()) |
| 2260 | | { |
| 2261 | | $activity = new UserActivity(); |
| 2262 | | return $activity->removeActivity($this, $args); |
| 2263 | | } |
| 2264 | | |
| 2265 | | /* ************************************************************* |
| 2266 | | * |