/** * Return information about registered operations. * * Modules can register operation strings * * @return * An array whose keys are operation strings used in * userpoints_userpoints_api() and the which has the following properties: * - description: A string that is used as a reason when transactions are * displayed. Either this or a callback (see below) is required. * - description callback: If the reason is dynamic, because he for example * includes the title of a node, a callback function can be given which * receives the transaction object and (if existing) and entity object as * arguments. * - admin description: A description which is searched for and displayed in * the operation autocomplete field in the add points form. * */ function hook_userpoints_info() { return array('expiry' => array('description' => t('!Points have expired.', userpoints_translation()), 'admin description' => t('Expire an existing transaction'))); }
print $user_stats_posts; ?> </div> <?php } ?> <?php /* Points */ ?> <?php if (isset($userpoints_points)) { ?> <div class="author-pane-line author-points"> <span class="author-pane-label"><?php print t('!Points', userpoints_translation()); ?> :</span> <?php print $userpoints_points; ?> </div> <?php } ?> </div> <?php /* Contact section */ ?> <div class="author-pane-section author-pane-contact"> <?php
/** * Provide settings for the shared Userpoints administration settings form. * * @return * A form structure consisting of one or multiple vertical_tabs belonging to * the #group settings_additional. */ function hook_userpoints_settings() { drupal_add_js(drupal_get_path('module', 'userpoints_nc') . '/userpoints_nc.js'); $form['userpoints_nc'] = array('#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Content'), '#group' => 'settings_additional', '#weight' => 15); $form['userpoints_nc']['userpoints_nc_enabled'] = array('#type' => 'checkbox', '#title' => t('Enabled by default.'), '#default_value' => userpoints_nc_get_setting('enabled', NULL, TRUE), '#description' => t('If checked, all content types award !points by default. This can be overridden for each content type on the content type edit page.', userpoints_translation())); }