/[drupal]/contributions/modules/shoutbox/shoutbox.module
ViewVC logotype

Diff of /contributions/modules/shoutbox/shoutbox.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.25.2.14, Tue Jul 15 07:55:28 2008 UTC revision 1.25.2.15, Tue Jul 15 08:11:17 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: shoutbox.module,v 1.25.2.13 2008/07/11 10:16:59 disterics Exp $  // $Id: shoutbox.module,v 1.25.2.14 2008/07/15 07:55:28 disterics Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 165  function shoutbox_cron() { Line 165  function shoutbox_cron() {
165  function shoutbox_perm() {  function shoutbox_perm() {
166    return array('post shouts', 'administer shoutbox', 'moderate shoutbox',    return array('post shouts', 'administer shoutbox', 'moderate shoutbox',
167                 'post shouts without approval', 'delete own shouts',                 'post shouts without approval', 'delete own shouts',
168                 'edit own shouts',);                 'edit own shouts', );
169  }  }
170    
171    
# Line 311  function theme_shoutbox_post($shout, $li Line 311  function theme_shoutbox_post($shout, $li
311      foreach ($links as $link) {      foreach ($links as $link) {
312        $linkattributes = $link['linkattributes'];        $linkattributes = $link['linkattributes'];
313        $link_html = '<img src="'. $link['img'] .'"  width="'. $link['img_width'] .'" height="'. $link['img_height'] .'" alt="'. $link['title'] .'" class="shoutbox-imglink">';        $link_html = '<img src="'. $link['img'] .'"  width="'. $link['img_width'] .'" height="'. $link['img_height'] .'" alt="'. $link['title'] .'" class="shoutbox-imglink">';
314        $link_url = 'shoutbox/'. $shout->shout_id . '/' . $link['action'];        $link_url = 'shoutbox/'. $shout->shout_id .'/'. $link['action'];
315        $img_links = l($link_html, $link_url, array('html' => TRUE)) . $img_links;        $img_links = l($link_html, $link_url, array('html' => TRUE)) . $img_links;
316      }      }
317    }    }
# Line 413  function shoutbox_admin_settings() { Line 413  function shoutbox_admin_settings() {
413    $form['time_settings'] = array(    $form['time_settings'] = array(
414      '#type' => 'fieldset',      '#type' => 'fieldset',
415      '#title' => t('Time Settings'),      '#title' => t('Time Settings'),
416      '#collapsible' => true,      '#collapsible' => TRUE,
417      '#collapsed' => false      '#collapsed' => FALSE,
418    );    );
419    $form['time_settings']['shoutbox_refresh'] = array(    $form['time_settings']['shoutbox_refresh'] = array(
420      '#type' => 'textfield',      '#type' => 'textfield',
# Line 845  function _shoutbox_block_view() { Line 845  function _shoutbox_block_view() {
845      'defaultNick' => $default_nick,      'defaultNick' => $default_nick,
846      'defaultMsg' => $default_msg,      'defaultMsg' => $default_msg,
847      'defaultUrl' => $default_url,      'defaultUrl' => $default_url,
848      'refreshPath' => base_path() . 'shoutbox/js/view',      'refreshPath' => base_path() .'shoutbox/js/view',
849    );    );
850    
851    drupal_add_js(array('shoutbox' => $js_settings), 'setting');    drupal_add_js(array('shoutbox' => $js_settings), 'setting');
# Line 877  function _shoutbox_display_posts($show_a Line 877  function _shoutbox_display_posts($show_a
877    // TODO: Output of this function should be single array    // TODO: Output of this function should be single array
878    $rows = array();    $rows = array();
879    // Figure out if we should display it in ascending or descending order.    // Figure out if we should display it in ascending or descending order.
880    $ascending = variable_get('shoutbox_ascending', false);    $ascending = variable_get('shoutbox_ascending', FALSE);
881    
882    // Get the shouts from the database.    // Get the shouts from the database.
883    if (!$pager) {    if (!$pager) {
# Line 1030  function _shoutbox_sanitize_shout(&$shou Line 1030  function _shoutbox_sanitize_shout(&$shou
1030    // All filtering (including urls, email addresses, censored words, and    // All filtering (including urls, email addresses, censored words, and
1031    // emoticons) is handled by the drupal filter system.    // emoticons) is handled by the drupal filter system.
1032    $shout->nick = check_plain($shout->nick);    $shout->nick = check_plain($shout->nick);
1033    $format = variable_get('shoutbox_filter_format','PLAIN');    $format = variable_get('shoutbox_filter_format', 'PLAIN');
1034    if ( $format == 'PLAIN') {    if ( $format == 'PLAIN') {
1035      $shout->shout = check_plain($shout->shout);      $shout->shout = check_plain($shout->shout);
1036    }    }
# Line 1043  function _shoutbox_sanitize_shout(&$shou Line 1043  function _shoutbox_sanitize_shout(&$shou
1043  }  }
1044    
1045  function _shoutbox_filter_form() {  function _shoutbox_filter_form() {
1046    $form = filter_form(variable_get('shoutbox_filter_format','FILTER_FORMAT_DEFAULT'), NULL, array('shoutbox_filter_format'));    $form = filter_form(variable_get('shoutbox_filter_format', 'FILTER_FORMAT_DEFAULT'), NULL, array('shoutbox_filter_format'));
1047    $formats = filter_formats();    $formats = filter_formats();
1048    
1049    if (count($formats) > 1) {    if (count($formats) > 1) {

Legend:
Removed from v.1.25.2.14  
changed lines
  Added in v.1.25.2.15

  ViewVC Help
Powered by ViewVC 1.1.2