本文整理汇总了PHP中JUDownloadHelper::getDefaultDocumentIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDownloadHelper::getDefaultDocumentIcon方法的具体用法?PHP JUDownloadHelper::getDefaultDocumentIcon怎么用?PHP JUDownloadHelper::getDefaultDocumentIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUDownloadHelper
的用法示例。
在下文中一共展示了JUDownloadHelper::getDefaultDocumentIcon方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
* ------------------------------------------------------------------------
* JUDownload for Joomla 2.5, 3.x
* ------------------------------------------------------------------------
*
* @copyright Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author JoomUltra Co., Ltd
* @website http://www.joomultra.com
* @----------------------------------------------------------------------@
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<script type="text/javascript">
var default_icon = "<?php echo JUDownloadHelper::getDefaultDocumentIcon(); ?>";
var document_icon_url = "<?php echo JUri::root(true) . "/". JUDownloadFrontHelper::getDirectory("document_icon_directory", "media/com_judownload/images/document/", true); ?>";
function jSelectDocument_related() {
var $ul = jQuery(".related-document-list").find(".related-documents");
var $document = $ul.find("li#document-" + arguments[0]);
if (!$document.length && arguments[0] != <?php echo (int)$this->item->id; ?>) {
var $li = '<li id="document-' + arguments[0] + '">';
$li += '<div class="document-inner">';
var icon_src = arguments[2] ? document_icon_url + arguments[2] : default_icon;
if (icon_src) {
$li += '<img class="image" src="' + icon_src + '" title="' + arguments[1] + '" width="<?php echo $this->params->get('document_icon_width', 150)?>px" height="<?php echo $this->params->get('document_icon_height', 150); ?>px" />';
}
var href = 'index.php?option=com_judownload&task=document.edit&id=' + arguments[0];
$li += '<a class="rel-document-title" target="_blank" href="' + href + '">' + arguments[1] + '</a>';
$li += '<a class="remove-rel-document" href="#" title="<?php echo JText::_('COM_JUDOWNLOAD_REMOVE_DOCUMENT'); ?>" ><?php echo JText::_('COM_JUDOWNLOAD_REMOVE_DOCUMENT'); ?></a>';
$li += '<input type="hidden" name="related_documents[]" value="' + arguments[0] + '" />';
示例2: getDocumentIcon
public static function getDocumentIcon($icon, $getDefault = true)
{
if ($icon) {
$documentIconUrl = JUDownloadFrontHelper::getDirectory("document_image_directory", "media/com_judownload/images/document/", true);
return JUri::root(true) . "/" . $documentIconUrl . $icon;
} elseif ($getDefault) {
return JUDownloadHelper::getDefaultDocumentIcon();
}
return '';
}
示例3: canView
public function canView($options = array())
{
$params = JUDownloadHelper::getParams(null, $this->doc_id);
$default_icon = JUDownloadHelper::getDefaultDocumentIcon();
if ($this->value == "" && $default_icon)
{
$this->value = "default/" . $params->get('listing_default_icon', 'default-document.png');
}
return parent::canView($options);
}
示例4: defined
* ------------------------------------------------------------------------
* JUDownload for Joomla 2.5, 3.x
* ------------------------------------------------------------------------
*
* @copyright Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author JoomUltra Co., Ltd
* @website http://www.joomultra.com
* @----------------------------------------------------------------------@
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<script type="text/javascript">
var default_icon = "<?php
echo JUDownloadHelper::getDefaultDocumentIcon();
?>
";
var document_icon_url = "<?php
echo JUri::root(true) . "/" . JUDownloadFrontHelper::getDirectory("document_icon_directory", "media/com_judownload/images/document/", true);
?>
";
function jSelectDocument_related() {
var $ul = jQuery(".related-document-list").find(".related-documents");
var $document = $ul.find("li#document-" + arguments[0]);
if (!$document.length && arguments[0] != <?php
echo (int) $this->item->id;
?>
) {
var $li = '<li id="document-' + arguments[0] + '">';
$li += '<div class="document-inner">';