/[drupal]/contributions/modules/mmedia/media.pages.inc
ViewVC logotype

Diff of /contributions/modules/mmedia/media.pages.inc

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

revision 1.1.2.3, Mon Feb 2 12:13:27 2009 UTC revision 1.1.2.4, Thu Mar 19 13:31:28 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: media.pages.inc,v 1.1.2.2 2008/11/06 12:12:30 rhys Exp $  // $Id: media.pages.inc,v 1.1 2008/11/06 08:48:35 rhys Exp $
3    
4  /**  /**
5   *  Standard content page.   *  Standard content page.
# Line 18  function mmedia_content_page() { Line 18  function mmedia_content_page() {
18    }    }
19    
20    if ($num_rows) {    if ($num_rows) {
21      $feed_url = url(MMEDIA_PATH . '/rss.xml', array('absolute' => TRUE));      $feed_url = url(MEDIA_PATH . '/rss.xml', array('absolute' => TRUE));
22      drupal_add_feed($feed_url, variable_get('site_name', 'Drupal') .' '. t('RSS'));      drupal_add_feed($feed_url, variable_get('site_name', 'Drupal') .' '. t('RSS'));
23      $output .= theme('pager', NULL, variable_get('mmedia_default_main_page', 10));      $output .= theme('pager', NULL, variable_get('mmedia_default_main_page', 10));
24    }    }
# Line 57  function mmedia_feed($mids = FALSE, $cha Line 57  function mmedia_feed($mids = FALSE, $cha
57    foreach ($mids as $mid) {    foreach ($mids as $mid) {
58      // Load the specified node:      // Load the specified node:
59      $item = media_load($mid);      $item = media_load($mid);
60      $item->link = url(MMEDIA_PATH ."/$mid", array('absolute' => TRUE));      $item->link = url(MEDIA_PATH ."/$mid", array('absolute' => TRUE));
61    
62      // Allow modules to add additional item fields and/or modify $item      // Allow modules to add additional item fields and/or modify $item
63      $extra = media_invoke_item('rss item', $item);      $extra = media_invoke_item('rss item', $item);
# Line 76  function mmedia_feed($mids = FALSE, $cha Line 76  function mmedia_feed($mids = FALSE, $cha
76        case 'teaser':        case 'teaser':
77          $item_text = $item->summary;          $item_text = $item->summary;
78          if (!empty($item->readmore)) {          if (!empty($item->readmore)) {
79            $item_text .= '<p>'. l(t('read more'), MMEDIA_PATH .'/'. $item->mid, array('absolute' => TRUE, 'attributes' => array('target' => '_blank'))) .'</p>';            $item_text .= '<p>'. l(t('read more'), MEDIA_PATH .'/'. $item->mid, array('absolute' => TRUE, 'attributes' => array('target' => '_blank'))) .'</p>';
80          }          }
81          break;          break;
82        case 'title':        case 'title':
# Line 212  function mmedia_folder_autocomplete($str Line 212  function mmedia_folder_autocomplete($str
212        if (preg_match('/,/', $folder->name) || preg_match('/"/', $folder->name)) {        if (preg_match('/,/', $folder->name) || preg_match('/"/', $folder->name)) {
213          $t = '"'. preg_replace('/"/', '""', $folder->name) .'"';          $t = '"'. preg_replace('/"/', '""', $folder->name) .'"';
214        }        }
215        $matches[$folder->fid] = '<span class="autocomplete_title">'. check_plain($t) .'</span> <span class="autocomplete_path">['. MMEDIA_FOLDER_PATH .'/'. $folder->path .']</span>';        $matches[$folder->fid] = '<span class="autocomplete_title">'. check_plain($t) .'</span> <span class="autocomplete_path">['. FOLDER_PATH .'/'. $folder->path .']</span>';
216      }      }
217      print drupal_to_js($matches);      print drupal_to_js($matches);
218      exit();      exit();

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

  ViewVC Help
Powered by ViewVC 1.1.2