Skip to content
Permalink
Browse files

Adding warning message when xmap detects a unpublished extension

git-svn-id: http://gw.vargas.co.cr/svn/com_xmap/trunk@61 662e6efe-d8c9-de11-9fdf-00d0b7ae443a
  • Loading branch information...
guilleva committed Jul 21, 2011
1 parent 5a2d1a3 commit b65f2af7a6581750bc7dd3830754ffc133bbe779
@@ -43,6 +43,8 @@ XMAP_SITEMAP_DETAILS_FIELDSET="Sitemap Details"
XMAP_XML_LINK="XML Sitemap"
XMAP_XML_LINK_TOOLTIP="Go to the XML version of the sitemap, use this url to submit your sitemap to Google and other search engines."

XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap have detected that the following extensions can help you to get more content in your site map but they are disabled, you have to manually enable them visiting the <a href='index.php?option=com_plugins&view=plugins&filter_type=xmap'>extensions manager</a>: %s"

XMAP_FIELDSET_MENUS="Menus"
XMAP_FIELDSET_OPTIONS="Options"
XMAP_FIELDSET_METADATA="Metadata"
@@ -90,19 +92,3 @@ XMAP_UPLOAD_FILE="Upload file"
XMAP_UPLOAD_PACKAGE_FILE="Upload package file"
XMAP_EXTENSION_MANAGER_TITLE="Extension Manager"
XMAP_EXTENSIONS_TITLE="Extensions"



; Generic Extension settings strings
XMAP_BASIC_FIELDSET_LABEL="Basic Settings"
XMAP_XML_FIELDSET_LABEL="XML Sitemap Settings"
XMAP_OPTION_USE_PARENT_MENU="Use Parent Menu Settings"
XMAP_OPTION_NEVER="Never"
XMAP_OPTION_ALWAYS="Always"
XMAP_OPTION_XML_ONLY="In XML Sitemap Only"
XMAP_OPTION_HTML_ONLY="In HTML Sitemap Only"
XMAP_OPTION_WEEKLY="Weekly"
XMAP_OPTION_DAILY="Daily"
XMAP_OPTION_MONTHLY="Monthly"
XMAP_OPTION_YEARLY="Yearly"
XMAP_OPTION_HOURLY="Hourly"
@@ -41,6 +41,8 @@ XMAP_SITEMAP_DETAILS_FIELDSET="Detalles del Mapa de sitio"
XMAP_XML_LINK="XML Sitemap"
XMAP_XML_LINK_TOOLTIP="Ir a la versión XML del mapa de sitio, utilice este URL para agregar su mapa de sitio en Google u otros motores de búsqueda."

XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap ha detectado que las siguientes extensiones podrían ayudarle a agregar mas contenido en su mapa de sitio pero están deshabilitadas. Es necesario que las habilite manualmente visitando el <a href='index.php?option=com_plugins&view=plugins&filter_type=xmap'>administrador de extensiones</a>: %s"

XMAP_FIELDSET_MENUS="Menus"
XMAP_FIELDSET_OPTIONS="Opciones"
XMAP_FIELDSET_METADATA="Metadata"
@@ -103,4 +105,4 @@ XMAP_OPTION_WEEKLY="Semanalmente"
XMAP_OPTION_DAILY="Diariamente"
XMAP_OPTION_MONTHLY="Mensualmente"
XMAP_OPTION_YEARLY="Anualmente"
XMAP_OPTION_HOURLY="Cada hora"
XMAP_OPTION_HOURLY="Cada hora"
@@ -100,4 +100,22 @@ protected function getListQuery($resolveFKs = true)
return $query;
}
public function getExtensionsMessage()
{
$db = JFactory::getDbo();
$db->setQuery('SELECT e.* from `#__extensions` e INNER JOIN `#__extensions` p ON e.element=p.element and p.enabled=0 and p.type=\'plugin\' and p.folder=\'xmap\' where e.type=\'component\' and e.enabled=1');
$extensions = $db->loadObjectList();
if ( count($extensions) ) {
$sep = $extensionsNameList = '';
foreach ($extensions as $extension) {
$extensionsNameList .= "$sep$extension->element";
$sep = ', ';
}
return JText::sprintf('XMAP_MESSAGE_EXTENSIONS_DISABLED',$extensionsNameList);
} else {
return "";
}
}
}
@@ -27,20 +27,21 @@ class XmapViewSitemaps extends JView
*/
public function display($tpl = null)
{
$state = $this->get('State');
$items = $this->get('Items');
$pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$message = $this->get('ExtensionsMessage');
if ( $message ) {
JFactory::getApplication()->enqueueMessage($message);
}
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->assignRef('state', $state);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->_setToolbar();
parent::display($tpl);
}

0 comments on commit b65f2af

Please sign in to comment.
You can’t perform that action at this time.