function getObjectInfo($id, $language = null)
 {
     $info = new JCommentsObjectInfo();
     $routerHelper = JPATH_SITE . '/components/com_hwdmediashare/helpers/route.php';
     if (is_file($routerHelper)) {
         require_once $routerHelper;
         $db = JFactory::getDBO();
         $db->setQuery('SELECT id, title, access, created_user_id FROM #__hwdms_media WHERE id = ' . $id);
         $row = $db->loadObject();
         if (!empty($row)) {
             $slug = $row->alias ? $row->id . ':' . $row->alias : $row->id;
             $info->title = $row->title ? 'Unknown hwdMediaShare Content' : $row->title;
             $info->userid = $row->created_user_id;
             $info->access = $row->access;
             $info->link = JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($slug));
         }
     }
     return $info;
 }
 public function load($cid)
 {
     static $instances = array();
     if (!isset($instances[$cid])) {
         // Get a row instance.
         JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_hwdmediashare/tables');
         $table = JTable::getInstance('Media', 'hwdMediaShareTable');
         // Attempt to load the row.
         if ($table->load((int) $cid)) {
             // Convert the JTable to a clean JObject.
             $properties = $table->getProperties(1);
             $this->_item = JArrayHelper::toObject($properties, 'JObject');
         } else {
             return $this->onLoadArticleError($cid);
         }
         $slug = $this->_item->alias ? $this->_item->id . ':' . $this->_item->alias : $this->_item->id;
         $link = hwdMediaShareHelperRoute::getMediaItemRoute($slug);
         $this->_item->permalink = $this->prepareLink($link);
         $instances[$cid] = $this->_item;
     }
     $this->_item = $instances[$cid];
     return $this;
 }
Пример #3
0
	<?php 
    if ($result->section) {
        ?>
	<dd class="result-category"> <span class="small<?php 
        echo $this->pageclass_sfx;
        ?>
"> (<?php 
        echo $this->escape($result->section);
        ?>
) </span> </dd>
	<?php 
    }
    ?>
	<dd class="result-text">
		<div class="image-left" style="max-width:100px;"> <a href="<?php 
    echo JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($result->id));
    ?>
"> <img src="<?php 
    echo JRoute::_(hwdMediaShareDownloads::thumbnail($result));
    ?>
" border="0" alt="<?php 
    echo $this->escape($result->title);
    ?>
" style="max-width:100%;" /> </a> </div>
		<?php 
    echo $result->text;
    ?>
		<div class="clear"></div>
	</dd>
	<?php 
    if ($this->params->get('show_date')) {
Пример #4
0
        ?>
" />
          </div>
          <?php 
        if ($item->duration > 0) {
            ?>
          <div class="media-duration">
             <?php 
            echo hwdMediaShareMedia::secondsToTime($item->duration);
            ?>
          </div>
          <?php 
        }
        ?>
          <a href="<?php 
        echo JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($item->slug));
        ?>
">
             <img src="<?php 
        echo JRoute::_(hwdMediaShareDownloads::thumbnail($item));
        ?>
" border="0" alt="<?php 
        echo $this->escape($item->title);
        ?>
" style="max-width:100%;" />
          </a>
          <?php 
    }
    ?>
        </div>
        <!-- Clears Item and Information -->
Пример #5
0
$canEditState = $user->authorise('core.edit.state', 'com_hwdmediashare.album.' . $this->item->id) || $user->authorise('core.edit.own', 'com_hwdmediashare') && $item->created_user_id == $user->id;
$canDelete = $user->authorise('core.edit', 'com_hwdmediashare.album.' . $this->item->id);
$hasDownloads = $this->hasDownloads();
$hasQualities = $this->hasQualities();
$hasMeta = $this->hasMeta();
?>

<div id="hwd-container"> <a name="top" id="top" title="top"></a> <?php 
echo hwdMediaShareHelperNavigation::getInternalNavigation();
?>
 
	<!-- Media Header -->
	<div class="media-header">
		<div class="page-header">
			<h2> <a href="<?php 
echo JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($this->item->id));
?>
" target="_top"> <?php 
echo $this->escape($this->item->title);
?>
 </a> </h2>
		</div>
		<div class="clear"></div>
	</div>
	<div id="media-item-container" class="media-item-container"> 
		<!-- Item Media -->
		<div class="media-item-full" id="media-item" style="width:100%;"> <?php 
echo hwdMediaShareMedia::get($this->item);
?>
 </div>
		<div class="clear"></div>
Пример #6
0
			<?php 
}
?>
			<a href="<?php 
echo JRoute::_('index.php?option=com_hwdmediashare&view=slideshow&id=' . $this->item->id . '&format=raw');
?>
" class="btn modal" rel="{handler: 'iframe', size: {<?php 
echo $modalSizeLarge;
?>
}}"> <i class="icon-search"></i> Zoom</a>
			<?php 
if (isset($this->item->navigation->next->id)) {
    $tip = '<img src="' . JRoute::_(hwdMediaShareDownloads::thumbnail($this->item->navigation->next)) . '" border="0" alt="' . $this->escape($this->item->navigation->next->title) . '" style="max-width:100%;" />';
    ?>
			<a href="<?php 
    echo JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($this->item->navigation->next->id));
    ?>
" class="btn"> <span class="editlinktip hasTip" title="<?php 
    echo $this->escape($this->item->navigation->next->title);
    ?>
::<?php 
    echo $this->escape(strip_tags($tip, '<img>,<br>'));
    ?>
" > <i class="icon-arrow-right"></i> <?php 
    echo JText::_('JNEXT');
    ?>
 </span> </a>
			<?php 
} else {
    ?>
			<a href="#" class="btn btn-disabled"> <span class="editlinktip hasTip pagenav-disabled pagenav-next" title="::<?php 
Пример #7
0
</a></li>
            <li<?php 
    echo JRequest::getInt('quality') == 240 ? ' class="active"' : '';
    ?>
><a href="<?php 
    echo JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($this->item->id, array('quality' => '720')));
    ?>
"><?php 
    echo JText::_('COM_HWDMS_720P');
    ?>
</a></li>
            <li<?php 
    echo JRequest::getInt('quality') == 240 ? ' class="active"' : '';
    ?>
><a href="<?php 
    echo JRoute::_(hwdMediaShareHelperRoute::getMediaItemRoute($this->item->id, array('quality' => '1080')));
    ?>
"><?php 
    echo JText::_('COM_HWDMS_1080P');
    ?>
</a></li>
          </ul>                        
        <?php 
}
?>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
    <!-- Tabs -->
    <?php 
if ($this->params->get('mediaitem_description_tab') != 'hide' || $this->params->get('mediaitem_related_tab') != 'hide' || $this->params->get('mediaitem_location_tab') != 'hide' || $this->params->get('mediaitem_tags_tab') != 'hide' || $this->params->get('mediaitem_associations_tab') != 'hide') {