本文整理汇总了PHP中JUDownloadHelper::isJoomla3x方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDownloadHelper::isJoomla3x方法的具体用法?PHP JUDownloadHelper::isJoomla3x怎么用?PHP JUDownloadHelper::isJoomla3x使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUDownloadHelper
的用法示例。
在下文中一共展示了JUDownloadHelper::isJoomla3x方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($tpl = null)
{
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode('<br />', $errors));
return false;
}
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->canDo = JUDownloadHelper::getActions('com_judownload');
$this->groupCanDoManage = JUDownloadHelper::checkGroupPermission("comment.edit");
$this->groupCanDoDelete = JUDownloadHelper::checkGroupPermission("comments.delete");
$this->rootComment = JUDownloadFrontHelperComment::getRootComment();
foreach ($this->items as &$item) {
$this->ordering[$item->parent_id][] = $item->id;
}
$this->addToolBar();
if (JUDownloadHelper::isJoomla3x()) {
$layout = JFactory::getApplication()->input->get('layout', '');
if ($layout != 'modal') {
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
}
}
parent::display($tpl);
$this->setDocument();
}
示例2: __set
public function __set($name, $value)
{
switch ($name) {
case 'height':
case 'width':
case 'assetField':
case 'authorField':
case 'asset':
$this->{$name} = (string) $value;
break;
case 'buttons':
$value = (string) $value;
if ($value == 'true' || $value == 'yes' || $value == '1') {
$this->buttons = true;
} elseif ($value == 'false' || $value == 'no' || $value == '0') {
$this->buttons = false;
} else {
$this->buttons = explode(',', $value);
}
break;
case 'hide':
$value = (string) $value;
$this->hide = $value ? explode(',', $value) : array();
break;
case 'editorType':
$this->editorType = explode('|', trim((string) $value));
break;
default:
if (JUDownloadHelper::isJoomla3x()) {
parent::__set($name, $value);
} else {
$this->{$name} = $value;
}
}
}
示例3: getOptions
protected function getOptions()
{
$document = JFactory::getDocument();
if (JUDownloadHelper::isJoomla3x()) {
$triggerJqueryChosen = '$("#jform_parent_id").trigger("liszt:updated");';
} else {
$triggerJqueryChosen = '';
}
$script = '
jQuery(document).ready(function($){
$("#jform_template_id").change(function(){
var objData = {};
objData.value = $(this).val();
$.ajax({
type: "POST",
url : "index.php?option=com_judownload&task=style.changeTemplateId",
data: objData
}).done(function (data) {
$("option","#jform_parent_id").remove();
$("#jform_parent_id").append(data);
' . $triggerJqueryChosen . '
});
});
});
';
$document->addScriptDeclaration($script);
$db = JFactory::getDbo();
$options = array();
$styleId = $this->form->getValue('id');
if ($styleId) {
$templateId = $this->form->getValue('template_id');
$query = $db->getQuery(true);
$query->select('parent_id');
$query->from('#__judownload_templates');
$query->where('id = ' . (int) $templateId);
$db->setQuery($query);
$templateParentId = $db->loadResult();
} else {
$templateParentId = 0;
}
$query = $db->getQuery(true);
$query->select('*');
$query->select('title AS text');
$query->select('id AS value');
$query->from('#__judownload_template_styles');
$query->where('template_id = ' . (int) $templateParentId);
$query->order('lft ASC');
$db->setQuery($query);
try {
$options = $db->loadObjectList();
} catch (RuntimeException $e) {
JError::raiseWarning(500, $e->getMessage());
}
for ($i = 0, $n = count($options); $i < $n; $i++) {
$options[$i]->text = str_repeat('- ', $options[$i]->level) . $options[$i]->text;
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
示例4: loadFormData
protected function loadFormData()
{
$data = JFactory::getApplication()->getUserState('com_judownload.edit.criteriagroup.data', array());
if (empty($data)) {
$data = $this->getItem();
}
if (JUDownloadHelper::isJoomla3x()) {
$this->preprocessData('com_judownload.criteriagroup', $data);
}
return $data;
}
示例5: fetchButton
public function fetchButton($type = 'JUHelp', $name = '', $text = '', $task = '', $list = true)
{
$i18n_text = JText::_($text);
$class = $this->fetchIconClass($name);
$doTask = $this->_getCommand($text, $task, $list);
if (!JUDownloadHelper::isJoomla3x()) {
$html = "<a href=\"#\" onclick=\"{$doTask}\" class=\"toolbar\">\n";
$html .= "<span class=\"{$class}\">\n";
$html .= "</span>\n";
$html .= "{$i18n_text}\n";
$html .= "</a>\n";
} else {
$html = "<button onclick=\"{$doTask}\" class=\"btn btn-small\">\n";
$html .= "<span class=\"{$class}\">\n";
$html .= "</span>\n";
$html .= "{$i18n_text}\n";
$html .= "</button>\n";
}
return $html;
}
示例6: getInput
protected function getInput()
{
$document = JFactory::getDocument();
$document->addStyleSheet(JUri::root() . 'administrator/components/com_judownload/assets/css/juselect.css');
$document->addScript(JUri::root() . 'administrator/components/com_judownload/assets/js/juselect.js');
$document->addScript(JUri::root() . "components/com_judownload/assets/js/jquery.dragsort.min.js");
$scriptv3 = '
setTimeout(function(){
$(".juselect-container").find(".juselect-select").show();
$(".juselect-container").next(".chzn-container").hide();
}, 10);';
$script = 'jQuery(document).ready(function($){
$("#' . $this->id . '").juSelect({
\'selectItems\' : "' . ($this->value ? implode(",", $this->value) : '') . '"
});
$(".juselect-list").dragsort({
dragSelector: "li",
placeHolderTemplate: \'<li class="placeHolder"></li>\',
dragSelectorExclude: \'a\'
});
' . (JUDownloadHelper::isJoomla3x() ? $scriptv3 : '') . '
});';
$document->addScriptDeclaration($script);
$attr = '';
$attr .= !empty($this->class) ? ' class="' . $this->class . '"' : '';
$attr .= !empty($this->size) ? ' size="' . $this->size . '"' : '';
$attr .= $this->multiple ? ' multiple' : '';
$attr .= $this->required ? ' required aria-required="true"' : '';
$attr .= $this->autofocus ? ' autofocus' : '';
if ((string) $this->readonly == '1' || (string) $this->readonly == 'true' || (string) $this->disabled == '1' || (string) $this->disabled == 'true') {
$attr .= ' disabled="disabled"';
}
$attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : '';
$options = (array) $this->getOptions();
return JHtml::_('select.groupedlist', $options, $this->name, array('id' => $this->id, 'group.id' => 'id', 'list.attr' => $attr, 'list.select' => ''));
}
示例7:
">
<?php
echo $item->title;
?>
</a>
<?php
} else {
?>
<?php
echo $item->title;
?>
<?php
}
?>
<p class="<?php
echo JUDownloadHelper::isJoomla3x() ? "small" : "smallsub";
?>
"><?php
echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));
?>
</p>
</td>
<td>
<?php
echo JUDownloadHelper::generateCategoryPath($item->parent_id, " > ", true, true);
?>
</td>
<td>
<?php
echo $item->access;
示例8: defined
* @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');
$title = "";
$class = "control-label col-sm-2";
if ($this->description)
{
if (JUDownloadHelper::isJoomla3x())
{
$class .= " hasTooltip";
$separator = "<br/>";
}
else
{
$separator = "::";
$class .= " hasTip";
}
// If write description as UPPERCASE -> translate it
if ($this->description == strtoupper($this->description))
{
$description = JText::_($this->description);
}
else
示例9: strtolower
JHtml::_('formbehavior.chosen', 'select');
$user = JFactory::getUser();
$userId = $user->get('id');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'field.ordering';
$priority = $listOrder == 'field.priority';
$backend_list_view_ordering = $listOrder == 'field.backend_list_view_ordering';
if ($saveOrder) {
$saveOrderingUrl = 'index.php?option=com_judownload&task=fields.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'data-list', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<script type="text/javascript">
var isJoomla3x = <?php
echo JUDownloadHelper::isJoomla3x() ? 1 : 0;
?>
;
Joomla.orderTable = function () {
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php
echo $listOrder;
?>
') {
dirn = 'asc';
} else {
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
示例10: getInput
//.........这里部分代码省略.........
$query->select("field_group.id, field_group.name");
$query->from("#__judownload_fields_groups AS field_group");
$query->join("", "#__judownload_categories AS c on c.fieldgroup_id = field_group.id");
$query->where("c.id = " . $mainCategory->id);
$query->where("field_group.published = 1");
$db->setQuery($query);
$fieldGroup = $db->loadObject();
if (is_object($fieldGroup))
{
$mainCategory->fieldgroup_name = $fieldGroup->name;
$mainCategory->fieldgroup_id = $fieldGroup->id;
}
else
{
$mainCategory->fieldgroup_name = null;
$mainCategory->fieldgroup_id = null;
}
}
else
{
$secondaryCatIds[] = $category->id;
}
}
if ($secondaryCatIds)
{
$secondaryCatIdsStr = implode(",", $secondaryCatIds);
}
}
elseif ($app->input->getInt('cat_id'))
{
$categoryId = $app->input->getInt('cat_id');
$mainCategory = JUDownloadHelper::getCategoryById($categoryId);
$query = "SELECT id, name FROM #__judownload_fields_groups WHERE id= " . $mainCategory->fieldgroup_id . " AND published = 1";
$db->setQuery($query);
$fieldGroup = $db->loadObject();
if (is_object($fieldGroup))
{
$mainCategory->fieldgroup_name = $fieldGroup->name;
$mainCategory->fieldgroup_id = $fieldGroup->id;
}
else
{
$mainCategory->fieldgroup_name = null;
$mainCategory->fieldgroup_id = null;
}
}
else
{
$mainCategory = new stdClass();
$mainCategory->id = '';
$mainCategory->parent_id = $rootCat->id;
$mainCategory->fieldgroup_name = null;
$mainCategory->fieldgroup_id = null;
}
$document->addStyleSheet(JUri::root() . "components/com_judownload/fields/" . $this->folder . "/core_categories.css");
if (!$disabled)
{
$document->addScript(JUri::root() . "components/com_judownload/fields/" . $this->folder . "/core_categories.js");
if (JUDownloadHelper::isJoomla3x())
{
$jsIsJoomla3x = 1;
}
else
{
$jsIsJoomla3x = 0;
}
$script = "jQuery(document).ready(function($){
$('.category_selection').docChangeCategory({
doc_id: '" . $docId . "',
is_joomla_3x: '" . $jsIsJoomla3x . "',
main_cat_id: '" . $mainCategory->id . "',
fieldgroup_id: '" . $mainCategory->fieldgroup_id . "',
fieldgroup_name : '" . $mainCategory->fieldgroup_name . "',
max_cats : " . (int) 1 . "
});
});";
$document->addScriptDeclaration($script);
}
$this->addAttribute("class", "categories", "input");
$this->addAttribute("class", $this->getInputClass(), "input");
$this->setVariable('mainCategory', $mainCategory);
$this->setVariable('secondaryCatIds', $secondaryCatIds);
$this->setVariable('documentObject', $documentObject);
$this->setVariable('disabled', $disabled);
$this->setVariable('secondaryCatIdsStr', $secondaryCatIdsStr);
$this->setVariable('rootCat', $rootCat);
$this->setVariable('params', $params);
return $this->fetch('input.php', __CLASS__);
}
示例11: loadFormData
protected function loadFormData()
{
$data = JFactory::getApplication()->getUserState('com_judownload.edit.category.data', array());
if (empty($data)) {
$data = $this->getItem();
}
$params = JUDownloadHelper::getParams($data->id);
if (isset($data->config_params) && $data->config_params) {
$params->loadArray($data->config_params);
$data->config_params = $params->toArray();
}
if (JUDownloadHelper::isJoomla3x()) {
$this->preprocessData('com_judownload.category', $data);
}
return $data;
}
示例12: spl_autoload_register
JLoader::register('JUDLViewAdmin', JPATH_ADMINISTRATOR . '/components/com_judownload/helpers/judlviewadmin.php');
JLoader::register('JUDownloadSearchHelper', JPATH_SITE . '/components/com_judownload/helpers/search.php');
spl_autoload_register(array('JUDownloadHelper', 'autoLoadFieldClass'));
jimport('joomla.application.component.controller');
$app = JFactory::getApplication();
$task = $app->input->get('task');
$view = $app->input->get('view');
$permission = JUDownloadHelper::checkGroupPermission($task, $view);
if (!$permission) {
return JError::raiseError(403, JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'));
}
if (!JFactory::getUser()->authorise('core.manage', 'com_judownload')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$document = JFactory::getDocument();
$isJoomla3x = JUDownloadHelper::isJoomla3x();
if ($isJoomla3x) {
$document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judownload/assets/css/styles.css');
} else {
$document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judownload/assets/css/styles.j25.css');
$document->addStyleSheet(JUri::root(true) . '/administrator/components/com_judownload/assets/css/jicomoon.css');
}
JUDownloadFrontHelper::loadjQuery();
JUDownloadFrontHelper::loadBootstrap();
$document->addScript(JUri::root() . "components/com_judownload/assets/js/jquery.dragsort.min.js");
if ($isJoomla3x && $view == 'subscriptions') {
$document->addScript(JUri::base() . "components/com_judownload/models/forms/subscriptions.js");
}
if ($isJoomla3x && $view == 'collections') {
$document->addScript(JUri::base() . "components/com_judownload/models/forms/collections.js");
}
示例13: getInput
protected function getInput()
{
$token = JSession::getFormToken();
$isJoomla3x = JUDownloadHelper::isJoomla3x();
$script = '
jQuery(document).ready(function($){';
if ($isJoomla3x && $this->checkEditor('codemirror')) {
$script .= '
Joomla.editors.instances["jform_php_predefined_values"].on("change", function(){
$("#jform_php_predefined_values").removeData("validPhp");
});';
} else {
$script .= '
$("#jform_php_predefined_values").on("change", function(){
$(this).removeData("validPhp");
});';
}
$script .= '
$("button.testcode").click(function(){
testPhpCode(false, "");
return false;
});
testPhpCode = function(submitOnSuccess, task){
var testCodeBtn = $("button.testcode");
if(testCodeBtn.hasClass("disabled"))
{
return false;
}
testCodeBtn.addClass("disabled");
var plugin_id = $("#jform_plugin_id").val();';
if ($isJoomla3x && $this->checkEditor('codemirror')) {
$script .= '
var php_code = Joomla.editors.instances["jform_php_predefined_values"].getValue();';
} else {
$script .= '
var php_code = $("#jform_php_predefined_values").val();';
}
$script .= '
$.ajax({
type: "POST",
url: "index.php?option=com_judownload&task=field.testPhpCode",
data: { field_id: ' . (int) $this->form->getValue('id') . ', plugin_id: plugin_id, php_predefined_values: php_code, "' . $token . '": 1 }
})
.done(function( data ) {
$("code.result").html(data).parent().show();
if(data.indexOf("<b>Fatal error</b>") !== -1)
{
$("#jform_php_predefined_values").data("validPhp", 0);
if(submitOnSuccess)
{
alert("Predefined PHP values is invalid");
}
return false;
}
else
{
$("#jform_php_predefined_values").data("validPhp", 1);
if(submitOnSuccess)
{
Joomla.submitbutton(task);
}
return true;
}
})
.fail(function(jqXHR, textStatus) {
$("#jform_php_predefined_values").data("validPhp", 0);
alert("Error " + jqXHR.status + ": " + jqXHR.statusText);
})
.always(function() {
testCodeBtn.removeClass("disabled");
});
}
});';
$document = JFactory::getDocument();
$document->addScriptDeclaration($script);
$editor = JFactory::getEditor('codemirror');
$html = '<button class="btn testcode"><i class="icon-ok"></i> Test code</button>';
$html .= '<div class="hide" style="clear: both; max-width: 100%; max-height: 300px; overflow: auto; margin: 10px 0;"><code class="result pull-left"></code></div>';
$html .= '<div style="clear: both; color: #999; font-family: Monaco,Menlo,Consolas,\'Courier New\',monospace; margin-top: 10px;">';
$html .= '<div>// Remember to not include the <b><?php</b> and <b>?></b> tags.</div>';
$html .= '<div>// To highlight code, put the first line as: <b>//<?php</b></div>';
$html .= '</div>';
if ($isJoomla3x && $this->checkEditor('codemirror')) {
$html .= $editor->display($this->name, htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'), $this->element['width'], $this->element['height'], $this->element['cols'], $this->element['rows'], false, $this->id);
} else {
$html .= '<textarea style="';
if ($this->element['width']) {
$html .= 'width: ' . $this->element['width'] . 'px;';
}
if ($this->element['height']) {
$html .= 'height: ' . $this->element['height'] . 'px;';
}
//.........这里部分代码省略.........
示例14: thumb
public static function thumb($template, $type = null)
{
$template = strtolower($template);
$basePath = JPATH_SITE . '/components/com_judownload/templates/' . $template;
$baseUrl = JUri::root(true) . '/components/com_judownload/';
if ($type == 'thumbnail') {
$fileList = JFolder::files($basePath . '/');
if (!empty($fileList)) {
foreach ($fileList as $fileName) {
$explodeArray = explode('.', $fileName);
if ($explodeArray[0] == 'template_thumbnail') {
$extThumbnail = end($explodeArray);
break;
}
}
}
if (isset($extThumbnail)) {
$thumb = $basePath . '/template_thumbnail.' . $extThumbnail;
}
if (isset($extThumbnail)) {
$preview = $basePath . '/template_thumbnail.' . $extThumbnail;
}
} elseif ($type == 'preview') {
$fileList = JFolder::files($basePath . '/');
if (!empty($fileList)) {
foreach ($fileList as $fileName) {
$explodeArray = explode('.', $fileName);
if ($explodeArray[0] == 'template_preview') {
$extPreview = end($explodeArray);
break;
}
}
}
if (isset($extPreview)) {
$thumb = $basePath . '/template_preview.' . $extPreview;
}
if (isset($extPreview)) {
$preview = $basePath . '/template_preview.' . $extPreview;
}
} else {
$fileList = JFolder::files($basePath . '/');
if (!empty($fileList)) {
foreach ($fileList as $fileName) {
$explodeArray = explode('.', $fileName);
if ($explodeArray[0] == 'template_thumbnail') {
$extThumbnail = end($explodeArray);
} elseif ($explodeArray[0] == 'template_preview') {
$extPreview = end($explodeArray);
}
}
}
if (isset($extThumbnail)) {
$thumb = $basePath . '/template_thumbnail.' . $extThumbnail;
}
if (isset($extPreview)) {
$preview = $basePath . '/template_preview.' . $extPreview;
}
}
$thumbIsImage = false;
if (isset($thumb)) {
if (@is_array(getimagesize($thumb))) {
$thumbIsImage = true;
}
}
$previewIsImage = false;
if (isset($preview)) {
if (@is_array(getimagesize($preview))) {
$previewIsImage = true;
}
}
$html = '';
if (isset($thumb) && $thumbIsImage && file_exists($thumb)) {
if (JUDownloadHelper::isJoomla3x()) {
JHtml::_('bootstrap.tooltip');
}
JHtml::_('behavior.modal');
if ($type == 'thumbnail') {
$thumb = 'components/com_judownload/templates/' . $template . '/template_thumbnail.' . $extThumbnail;
$html = JHtml::_('image', $thumb, JText::_('COM_JUDOWNLOAD_PREVIEW'), array('width' => '200px', 'height' => '200px'));
} elseif ($type == 'preview') {
$thumb = 'components/com_judownload/templates/' . $template . '/template_preview.' . $extPreview;
$html = JHtml::_('image', $thumb, JText::_('COM_JUDOWNLOAD_PREVIEW'), array('width' => '200px', 'height' => '200px'));
} else {
$thumb = 'components/com_judownload/templates/' . $template . '/template_thumbnail.' . $extThumbnail;
$html = JHtml::_('image', $thumb, JText::_('COM_JUDOWNLOAD_PREVIEW'));
}
if (isset($preview) && $previewIsImage && file_exists($preview)) {
if ($type == 'thumbnail') {
$preview = $baseUrl . '/templates/' . $template . '/template_thumbnail.' . $extThumbnail;
} elseif ($type == 'preview') {
$preview = $baseUrl . '/templates/' . $template . '/template_preview.' . $extPreview;
} else {
$preview = $baseUrl . '/templates/' . $template . '/template_preview.' . $extPreview;
}
if (JUDownloadHelper::isJoomla3x()) {
$html = '<a href="' . $preview . '" class="thumbnail pull-left modal hasTooltip" title="' . JHtml::tooltipText('COM_JUDOWNLOAD_CLICK_TO_ENLARGE') . '">' . $html . '</a>';
} else {
$html = '<a href="' . $preview . '" class="thumbnail pull-left modal hasTip" title="' . JText::_('COM_JUDOWNLOAD_CLICK_TO_ENLARGE') . '" style="width:200px;">' . $html . '</a>';
}
}
//.........这里部分代码省略.........
示例15: loadBootstrap
public static function loadBootstrap($version = 2, $type = 2)
{
$document = JFactory::getDocument();
if ($document->getType() != 'html')
{
return true;
}
$isJoomla3x = JUDownloadHelper::isJoomla3x();
$app = JFactory::getApplication();
if ($type == 0 && ($isJoomla3x || $app->isSite()))
{
return false;
}
$loadBootstrap = true;
if ($type == 2 || $app->isAdmin())
{
$header = $document->getHeadData();
$scripts = $header['scripts'];
if (count($scripts))
{
$pattern = '/([\/\\a-zA-Z0-9_:\.-]*)bootstrap.([0-9\.-]|core|custom|min|pack)*?.js(.*?)/i';
foreach ($scripts AS $script => $opts)
{
if (preg_match($pattern, $script))
{
$loadBootstrap = false;
break;
}
}
}
}
if ($loadBootstrap)
{
JUDownloadFrontHelper::loadjQuery();
if ($version == 2)
{
if (!$isJoomla3x)
{
$document->addScript(JUri::root(true) . '/components/com_judownload/assets/bootstrap2/js/bootstrap.min.js');
$document->addStyleSheet(JUri::root(true) . '/components/com_judownload/assets/bootstrap2/css/bootstrap.min.css');
$document->addStyleSheet(JUri::root(true) . '/components/com_judownload/assets/bootstrap2/css/bootstrap-responsive.min.css');
$document->addScriptDeclaration('
jQuery(document).ready(function($){
$(\'.hasTooltip\').tooltip({\'html\': true, trigger: \'hover\'}).bind(\'hidden\', function () {
$(this).show();
});
});
');
}
else
{
JHtml::_('bootstrap.framework');
if ($app->isSite())
{
}
}
}
elseif ($version == 3)
{
$document->addScript(JUri::root(true) . '/components/com_judownload/assets/bootstrap3/js/bootstrap.min.js');
$document->addStyleSheet(JUri::root(true) . '/components/com_judownload/assets/bootstrap3/css/bootstrap.min.css');
}
}
if ($app->isAdmin())
{
$document->addScript(JUri::root(true) . '/administrator/components/com_judownload/assets/js/bootstrap-hover-dropdown.js');
}
}