30
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-06-07 00:40:48 +00:00
This commit is contained in:
Michael Babker 2014-09-01 10:48:14 -04:00
parent 958e23bb34
commit 81faa2db78
21 changed files with 349 additions and 296 deletions

View File

@ -1,12 +1,12 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8
COM_WEBLINKS="Weblinks" COM_WEBLINKS="Weblinks"
COM_WEBLINKS_ACCESS_HEADING="Access" COM_WEBLINKS_ACCESS_HEADING="Access"
COM_WEBLINKS_BATCH_OPTIONS="Batch process the selected links" COM_WEBLINKS_BATCH_OPTIONS="Batch process the selected links"
COM_WEBLINKS_BATCH_TIP="If choosing to copy a link, any other actions selected will be applied to the copied link. Otherwise, all actions are applied to the selected link." COM_WEBLINKS_BATCH_TIP="If a category is selected for move/copy, any actions selected will be applied to the copied or moved links. Otherwise, all actions are applied to the selected links."
COM_WEBLINKS_CATEGORIES_DESC="These settings apply for Web Links Categories Options unless they are changed for a specific menu item." COM_WEBLINKS_CATEGORIES_DESC="These settings apply for Web Links Categories Options unless they are changed for a specific menu item."
COM_WEBLINKS_CATEGORY_DESC="These settings apply for Web Links Category Options unless they are changed for a specific menu item." COM_WEBLINKS_CATEGORY_DESC="These settings apply for Web Links Category Options unless they are changed for a specific menu item."
COM_WEBLINKS_COMPONENT_DESC="These settings apply for Web Links unless they are changed for a specific menu item or web link." COM_WEBLINKS_COMPONENT_DESC="These settings apply for Web Links unless they are changed for a specific menu item or web link."

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8

View File

@ -8,30 +8,28 @@
description="JGLOBAL_FIELD_ID_DESC"/> description="JGLOBAL_FIELD_ID_DESC"/>
<field name="title" type="text" <field name="title" type="text"
class="inputbox input-xxlarge input-large-text" class="input-xxlarge input-large-text"
size="40" label="JGLOBAL_TITLE" size="40" label="JGLOBAL_TITLE"
description="COM_WEBLINKS_FIELD_TITLE_DESC" required="true" /> description="COM_WEBLINKS_FIELD_TITLE_DESC" required="true" />
<field name="alias" type="text" class="inputbox" <field name="alias" type="text"
size="40" label="JFIELD_ALIAS_LABEL" size="40" label="JFIELD_ALIAS_LABEL"
description="COM_WEBLINKS_FIELD_ALIAS_DESC" description="COM_WEBLINKS_FIELD_ALIAS_DESC"
hint="JFIELD_ALIAS_PLACEHOLDER" /> hint="JFIELD_ALIAS_PLACEHOLDER" />
<field name="catid" type="categoryedit" extension="com_weblinks" <field name="catid" type="categoryedit" extension="com_weblinks"
label="JCATEGORY" description="COM_WEBLINKS_FIELD_CATEGORY_DESC" label="JCATEGORY" description="COM_WEBLINKS_FIELD_CATEGORY_DESC"
class="inputbox"
> >
</field> </field>
<field name="url" type="url" <field name="url" type="url"
class="inputbox span12" class="span12"
filter="url" filter="url"
size="40" label="COM_WEBLINKS_FIELD_URL_LABEL" size="40" label="COM_WEBLINKS_FIELD_URL_LABEL"
description="COM_WEBLINKS_FIELD_URL_DESC" required="true" /> description="COM_WEBLINKS_FIELD_URL_DESC" required="true" />
<field name="description" type="editor" buttons="true" hide="pagebreak,readmore" <field name="description" type="editor" buttons="true" hide="pagebreak,readmore"
class="inputbox"
filter="JComponentHelper::filterText" filter="JComponentHelper::filterText"
label="JGLOBAL_DESCRIPTION" description="COM_WEBLINKS_FIELD_DESCRIPTION_DESC" /> label="JGLOBAL_DESCRIPTION" description="COM_WEBLINKS_FIELD_DESCRIPTION_DESC" />
@ -64,21 +62,21 @@
value="-2">JTRASHED</option> value="-2">JTRASHED</option>
</field> </field>
<field name="ordering" type="ordering" class="inputbox" <field name="ordering" type="ordering"
label="JFIELD_ORDERING_LABEL" label="JFIELD_ORDERING_LABEL"
description="JFIELD_ORDERING_DESC" description="JFIELD_ORDERING_DESC"
content_type="com_weblinks.weblink" content_type="com_weblinks.weblink"
/> />
<field name="access" type="accesslevel" label="JFIELD_ACCESS_LABEL" <field name="access" type="accesslevel" label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC" class="inputbox" size="1" /> description="JFIELD_ACCESS_DESC" size="1" />
<field <field
name="language" name="language"
type="contentlanguage" type="contentlanguage"
label="JFIELD_LANGUAGE_LABEL" label="JFIELD_LANGUAGE_LABEL"
description="COM_WEBLINKS_FIELD_LANGUAGE_DESC" description="COM_WEBLINKS_FIELD_LANGUAGE_DESC"
class="inputbox"> >
<option value="*">JALL</option> <option value="*">JALL</option>
</field> </field>
@ -86,7 +84,6 @@
type="tag" type="tag"
label="JTAG" label="JTAG"
description="JTAG_DESC" description="JTAG_DESC"
class="inputbox"
multiple="true" multiple="true"
> >
</field> </field>
@ -95,13 +92,13 @@
type="text" type="text"
label="JGLOBAL_FIELD_VERSION_NOTE_LABEL" label="JGLOBAL_FIELD_VERSION_NOTE_LABEL"
description="JGLOBAL_FIELD_VERSION_NOTE_DESC" description="JGLOBAL_FIELD_VERSION_NOTE_DESC"
class="inputbox" size="45" size="45"
labelclass="control-label" labelclass="control-label"
/> />
<field name="created" type="calendar" <field name="created" type="calendar"
label="JGLOBAL_FIELD_CREATED_LABEL" description="JGLOBAL_FIELD_CREATED_DESC" label="JGLOBAL_FIELD_CREATED_LABEL" description="JGLOBAL_FIELD_CREATED_DESC"
class="inputbox" size="22" format="%Y-%m-%d %H:%M:%S" size="22" format="%Y-%m-%d %H:%M:%S"
filter="user_utc" /> filter="user_utc" />
<field name="created_by" type="user" <field name="created_by" type="user"
@ -109,7 +106,7 @@
<field name="created_by_alias" type="text" <field name="created_by_alias" type="text"
label="JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL" description="JGLOBAL_FIELD_CREATED_BY_ALIAS_DESC" label="JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL" description="JGLOBAL_FIELD_CREATED_BY_ALIAS_DESC"
class="inputbox" size="20" /> size="20" />
<field name="modified" type="calendar" class="readonly" <field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_WEBLINKS_FIELD_MODIFIED_DESC" label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_WEBLINKS_FIELD_MODIFIED_DESC"
@ -128,12 +125,12 @@
<field name="publish_up" type="calendar" <field name="publish_up" type="calendar"
label="JGLOBAL_FIELD_PUBLISH_UP_LABEL" description="JGLOBAL_FIELD_PUBLISH_UP_DESC" label="JGLOBAL_FIELD_PUBLISH_UP_LABEL" description="JGLOBAL_FIELD_PUBLISH_UP_DESC"
class="inputbox" format="%Y-%m-%d %H:%M:%S" size="22" format="%Y-%m-%d %H:%M:%S" size="22"
filter="user_utc" /> filter="user_utc" />
<field name="publish_down" type="calendar" <field name="publish_down" type="calendar"
label="JGLOBAL_FIELD_PUBLISH_DOWN_LABEL" description="JGLOBAL_FIELD_PUBLISH_DOWN_DESC" label="JGLOBAL_FIELD_PUBLISH_DOWN_LABEL" description="JGLOBAL_FIELD_PUBLISH_DOWN_DESC"
class="inputbox" format="%Y-%m-%d %H:%M:%S" size="22" format="%Y-%m-%d %H:%M:%S" size="22"
filter="user_utc" /> filter="user_utc" />
<field name="version" type="text" class="readonly" <field name="version" type="text" class="readonly"
@ -143,15 +140,15 @@
<field name="metakey" type="textarea" <field name="metakey" type="textarea"
label="JFIELD_META_KEYWORDS_LABEL" description="JFIELD_META_KEYWORDS_DESC" label="JFIELD_META_KEYWORDS_LABEL" description="JFIELD_META_KEYWORDS_DESC"
class="inputbox" rows="3" cols="30" /> rows="3" cols="30" />
<field name="metadesc" type="textarea" <field name="metadesc" type="textarea"
label="JFIELD_META_DESCRIPTION_LABEL" description="JFIELD_META_DESCRIPTION_DESC" label="JFIELD_META_DESCRIPTION_LABEL" description="JFIELD_META_DESCRIPTION_DESC"
class="inputbox" rows="3" cols="30" /> rows="3" cols="30" />
<field name="xreference" type="text" <field name="xreference" type="text"
label="JFIELD_XREFERENCE_LABEL" description="JFIELD_XREFERENCE_DESC" label="JFIELD_XREFERENCE_LABEL" description="JFIELD_XREFERENCE_DESC"
class="inputbox" size="20" /> size="20" />
</fieldset> </fieldset>
<fields name="params" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS"> <fields name="params" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">
@ -167,11 +164,11 @@
</field> </field>
<field name="width" type="text" <field name="width" type="text"
class="inputbox validate-numeric" label="COM_WEBLINKS_FIELD_WIDTH_LABEL" class="validate-numeric" label="COM_WEBLINKS_FIELD_WIDTH_LABEL"
description="COM_WEBLINKS_FIELD_WIDTH_DESC" /> description="COM_WEBLINKS_FIELD_WIDTH_DESC" />
<field name="height" type="text" <field name="height" type="text"
class="inputbox validate-numeric" label="COM_WEBLINKS_FIELD_HEIGHT_LABEL" class="validate-numeric" label="COM_WEBLINKS_FIELD_HEIGHT_LABEL"
description="COM_WEBLINKS_FIELD_HEIGHT_DESC" /> description="COM_WEBLINKS_FIELD_HEIGHT_DESC" />
<field name="count_clicks" type="list" <field name="count_clicks" type="list"
@ -206,13 +203,11 @@
type="text" type="text"
label="COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL" label="COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL"
description="COM_WEBLINKS_FIELD_IMAGE_ALT_DESC" description="COM_WEBLINKS_FIELD_IMAGE_ALT_DESC"
class="inputbox"
size="20" /> size="20" />
<field name="image_first_caption" <field name="image_first_caption"
type="text" type="text"
label="COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL" label="COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL"
description="COM_WEBLINKS_FIELD_IMAGE_CAPTION_DESC" description="COM_WEBLINKS_FIELD_IMAGE_CAPTION_DESC"
class="inputbox"
size="20" /> size="20" />
<field name="spacer1" <field name="spacer1"
@ -238,13 +233,11 @@
type="text" type="text"
label="COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL" label="COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL"
description="COM_WEBLINKS_FIELD_IMAGE_ALT_DESC" description="COM_WEBLINKS_FIELD_IMAGE_ALT_DESC"
class="inputbox"
size="20" /> size="20" />
<field name="image_second_caption" <field name="image_second_caption"
type="text" type="text"
label="COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL" label="COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL"
description="COM_WEBLINKS_FIELD_IMAGE_CAPTION_DESC" description="COM_WEBLINKS_FIELD_IMAGE_CAPTION_DESC"
class="inputbox"
size="20" /> size="20" />
</fieldset> </fieldset>
</fields> </fields>

View File

@ -194,7 +194,7 @@ class WeblinksModelWeblinks extends JModelList
} }
else else
{ {
$search = $db->quote('%' . $db->escape($search, true) . '%'); $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));
$query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')'); $query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')');
} }
} }

View File

@ -26,6 +26,9 @@ class WeblinksTableWeblink extends JTable
public function __construct(&$db) public function __construct(&$db)
{ {
parent::__construct('#__weblinks', 'id', $db); parent::__construct('#__weblinks', 'id', $db);
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
} }
/** /**
@ -77,10 +80,11 @@ class WeblinksTableWeblink extends JTable
$date = JFactory::getDate(); $date = JFactory::getDate();
$user = JFactory::getUser(); $user = JFactory::getUser();
$this->modified = $date->toSql();
if ($this->id) if ($this->id)
{ {
// Existing item // Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id'); $this->modified_by = $user->get('id');
} }
else else

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM ; Note : All ini files need to be saved as UTF-8 - No BOM

View File

@ -193,7 +193,7 @@ class WeblinksModelCategory extends JModelList
$params = JComponentHelper::getParams('com_weblinks'); $params = JComponentHelper::getParams('com_weblinks');
// List state information // List state information
$limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'uint'); $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->get('list_limit'), 'uint');
$this->setState('list.limit', $limit); $this->setState('list.limit', $limit);
$limitstart = $app->input->get('limitstart', 0, 'uint'); $limitstart = $app->input->get('limitstart', 0, 'uint');
@ -334,6 +334,7 @@ class WeblinksModelCategory extends JModelList
{ {
$this->getCategory(); $this->getCategory();
} }
return $this->_children; return $this->_children;
} }
@ -354,7 +355,6 @@ class WeblinksModelCategory extends JModelList
if ($hitcount) if ($hitcount)
{ {
$pk = (!empty($pk)) ? $pk : (int) $this->getState('category.id'); $pk = (!empty($pk)) ? $pk : (int) $this->getState('category.id');
$table = JTable::getInstance('Category', 'JTable'); $table = JTable::getInstance('Category', 'JTable');
$table->load($pk); $table->load($pk);
$table->hit($pk); $table->hit($pk);

View File

@ -9,24 +9,35 @@
defined('_JEXEC') or die; defined('_JEXEC') or die;
/**
* Routing class from com_weblinks
*
* @package Joomla.Site
* @subpackage com_weblinks
* @since 3.3
*/
class WeblinksRouter extends JComponentRouterBase
{
/** /**
* Build the route for the com_weblinks component * Build the route for the com_weblinks component
* *
* @return array An array of URL arguments * @param array &$query An array of URL arguments
* *
* @return array The URL arguments to use to assemble the subsequent URL. * @return array The URL arguments to use to assemble the subsequent URL.
*
* @since 3.3
*/ */
function WeblinksBuildRoute(&$query) public function build(&$query)
{ {
$segments = array(); $segments = array();
// get a menu item based on Itemid or currently active // Get a menu item based on Itemid or currently active
$app = JFactory::getApplication(); $app = JFactory::getApplication();
$menu = $app->getMenu(); $menu = $app->getMenu();
$params = JComponentHelper::getParams('com_weblinks'); $params = JComponentHelper::getParams('com_weblinks');
$advanced = $params->get('sef_advanced_link', 0); $advanced = $params->get('sef_advanced_link', 0);
// we need a menu item. Either the one specified in the query, or the current active one if none specified // We need a menu item. Either the one specified in the query, or the current active one if none specified
if (empty($query['Itemid'])) if (empty($query['Itemid']))
{ {
$menuItem = $menu->getActive(); $menuItem = $menu->getActive();
@ -55,7 +66,7 @@ function WeblinksBuildRoute(&$query)
} }
} }
// are we dealing with an weblink that is attached to a menu item? // Are we dealing with an weblink that is attached to a menu item?
if (isset($query['view']) && ($mView == $query['view']) and (isset($query['id'])) and ($mId == (int) $query['id'])) if (isset($query['view']) && ($mView == $query['view']) and (isset($query['id'])) and ($mId == (int) $query['id']))
{ {
unset($query['view']); unset($query['view']);
@ -89,6 +100,7 @@ function WeblinksBuildRoute(&$query)
$path = array_reverse($path); $path = array_reverse($path);
$array = array(); $array = array();
foreach ($path as $id) foreach ($path as $id)
{ {
if ((int) $id == (int) $menuCatid) if ((int) $id == (int) $menuCatid)
@ -103,6 +115,7 @@ function WeblinksBuildRoute(&$query)
$array[] = $id; $array[] = $id;
} }
$segments = array_merge($segments, array_reverse($array)); $segments = array_merge($segments, array_reverse($array));
} }
@ -143,20 +156,35 @@ function WeblinksBuildRoute(&$query)
} }
} }
$total = count($segments);
for ($i = 0; $i < $total; $i++)
{
$segments[$i] = str_replace(':', '-', $segments[$i]);
}
return $segments; return $segments;
} }
/** /**
* Parse the segments of a URL. * Parse the segments of a URL.
* *
* @return array The segments of the URL to parse. * @param array &$segments The segments of the URL to parse.
* *
* @return array The URL attributes to be used by the application. * @return array The URL attributes to be used by the application.
*
* @since 3.3
*/ */
function WeblinksParseRoute($segments) public function parse(&$segments)
{ {
$total = count($segments);
$vars = array(); $vars = array();
for ($i = 0; $i < $total; $i++)
{
$segments[$i] = preg_replace('/-/', ':', $segments[$i], 1);
}
// Get the active menu item. // Get the active menu item.
$app = JFactory::getApplication(); $app = JFactory::getApplication();
$menu = $app->getMenu(); $menu = $app->getMenu();
@ -172,6 +200,7 @@ function WeblinksParseRoute($segments)
{ {
$vars['view'] = $segments[0]; $vars['view'] = $segments[0];
$vars['id'] = $segments[$count - 1]; $vars['id'] = $segments[$count - 1];
return $vars; return $vars;
} }
@ -227,3 +256,26 @@ function WeblinksParseRoute($segments)
return $vars; return $vars;
} }
}
/**
* Weblinks router functions
*
* These functions are proxys for the new router interface
* for old SEF extensions.
*
* @deprecated 4.0 Use Class based routers instead
*/
function WeblinksBuildRoute(&$query)
{
$router = new WeblinksRouter;
return $router->build($query);
}
function WeblinksParseRoute($segments)
{
$router = new WeblinksRouter;
return $router->parse($segments);
}

View File

@ -33,7 +33,7 @@ if (count($this->items[$this->parent->id]) > 0 && $this->maxLevelcat != 0) :
<?php echo $item->numitems; ?> <?php echo $item->numitems; ?>
</span> </span>
<?php endif; ?> <?php endif; ?>
<?php if (count($item->getChildren()) > 0) : ?> <?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
<a href="#category-<?php echo $item->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a> <a href="#category-<?php echo $item->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
<?php endif;?> <?php endif;?>
</h3> </h3>
@ -45,7 +45,7 @@ if (count($this->items[$this->parent->id]) > 0 && $this->maxLevelcat != 0) :
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if (count($item->getChildren()) > 0) :?> <?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) :?>
<div class="collapse fade" id="category-<?php echo $item->id;?>"> <div class="collapse fade" id="category-<?php echo $item->id;?>">
<?php <?php
$this->items[$item->id] = $item->getChildren(); $this->items[$item->id] = $item->getChildren();

View File

@ -15,8 +15,10 @@ JHtml::_('behavior.framework');
// Create a shortcut for params. // Create a shortcut for params.
$params = &$this->item->params; $params = &$this->item->params;
// Get the user object. // Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
// Check if user is allowed to add/edit based on weblinks permissinos. // Check if user is allowed to add/edit based on weblinks permissinos.
$canEdit = $user->authorise('core.edit', 'com_weblinks.category.' . $this->category->id); $canEdit = $user->authorise('core.edit', 'com_weblinks.category.' . $this->category->id);
$canCreate = $user->authorise('core.create', 'com_weblinks'); $canCreate = $user->authorise('core.create', 'com_weblinks');
@ -100,26 +102,26 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php switch ($item->params->get('target', $this->params->get('target'))) <?php switch ($item->params->get('target', $this->params->get('target')))
{ {
case 1: case 1:
// open in a new window // Open in a new window
echo '<a href="' . $link . '" target="_blank" class="' . $menuclass . '" rel="nofollow">' . echo '<a href="' . $link . '" target="_blank" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . '</a>'; $this->escape($item->title) . '</a>';
break; break;
case 2: case 2:
// open in a popup window // Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $this->escape($width) . ',height=' . $this->escape($height) . ''; $attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $this->escape($width) . ',height=' . $this->escape($height) . '';
echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" . echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" .
$this->escape($item->title) . '</a>'; $this->escape($item->title) . '</a>';
break; break;
case 3: case 3:
// open in a modal window // Open in a modal window
JHtml::_('behavior.modal', 'a.modal'); JHtml::_('behavior.modal', 'a.modal');
echo '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x:' . $this->escape($width) . ', y:' . $this->escape($height) . '}}">' . echo '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x:' . $this->escape($width) . ', y:' . $this->escape($height) . '}}">' .
$this->escape($item->title) . ' </a>'; $this->escape($item->title) . ' </a>';
break; break;
default: default:
// open in parent window // Open in parent window
echo '<a href="' . $link . '" class="' . $menuclass . '" rel="nofollow">' . echo '<a href="' . $link . '" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . ' </a>'; $this->escape($item->title) . ' </a>';
break; break;

View File

@ -43,7 +43,6 @@ class WeblinksViewForm extends JViewLegacy
else else
{ {
$authorised = $user->authorise('core.edit', 'com_weblinks.category.'.$this->item->catid); $authorised = $user->authorise('core.edit', 'com_weblinks.category.'.$this->item->catid);
} }
if ($authorised !== true) if ($authorised !== true)
@ -61,6 +60,7 @@ class WeblinksViewForm extends JViewLegacy
if (count($errors = $this->get('Errors'))) if (count($errors = $this->get('Errors')))
{ {
JError::raiseWarning(500, implode("\n", $errors)); JError::raiseWarning(500, implode("\n", $errors));
return false; return false;
} }
@ -109,14 +109,16 @@ class WeblinksViewForm extends JViewLegacy
} }
$title = $this->params->def('page_title', $head); $title = $this->params->def('page_title', $head);
if ($app->getCfg('sitename_pagetitles', 0) == 1)
if ($app->get('sitename_pagetitles', 0) == 1)
{ {
$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
} }
elseif ($app->getCfg('sitename_pagetitles', 0) == 2) elseif ($app->get('sitename_pagetitles', 0) == 2)
{ {
$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
} }
$this->document->setTitle($title); $this->document->setTitle($title);
if ($this->params->get('menu-meta_description')) if ($this->params->get('menu-meta_description'))

View File

@ -1 +0,0 @@
<!DOCTYPE html><title></title>

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM ; Note : All ini files need to be saved as UTF-8 - No BOM

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM ; Note : All ini files need to be saved as UTF-8 - No BOM

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8

View File

@ -1,8 +1,9 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8
PLG_FINDER_STATISTICS_WEB_LINK="Weblink"
PLG_FINDER_WEBLINKS="Smart Search - Weblinks" PLG_FINDER_WEBLINKS="Smart Search - Weblinks"
PLG_FINDER_WEBLINKS_ERROR_ACTIVATING_PLUGIN="Could not automatically activate the "_QQ_"Smart Search - Weblinks"_QQ_" plugin" PLG_FINDER_WEBLINKS_ERROR_ACTIVATING_PLUGIN="Could not automatically activate the "_QQ_"Smart Search - Weblinks"_QQ_" plugin"
PLG_FINDER_WEBLINKS_XML_DESCRIPTION="This plugin indexes Joomla! Weblinks." PLG_FINDER_WEBLINKS_XML_DESCRIPTION="This plugin indexes Joomla! Weblinks."

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8

View File

@ -1,5 +1,5 @@
; Joomla! Project ; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved. ; Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 ; Note : All ini files need to be saved as UTF-8