| 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. |
| 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 |
} |
} |
| 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); |
| 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': |
| 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(); |