本文整理汇总了PHP中hwdMediaShareHelperRoute::getMediaItemRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP hwdMediaShareHelperRoute::getMediaItemRoute方法的具体用法?PHP hwdMediaShareHelperRoute::getMediaItemRoute怎么用?PHP hwdMediaShareHelperRoute::getMediaItemRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hwdMediaShareHelperRoute
的用法示例。
在下文中一共展示了hwdMediaShareHelperRoute::getMediaItemRoute方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getObjectInfo
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;
}
示例2: load
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:
<?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:
?>
" />
</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:
$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:
<?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: array
</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') {