1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 17:01:43 +02:00

Fixes #859 Gsitemap language file and other code cleanup.

This commit is contained in:
Cameron
2015-02-05 11:58:56 -08:00
parent ecce5b978c
commit 7f57db1637
3 changed files with 8 additions and 9 deletions

View File

@@ -164,7 +164,7 @@ class gsitemap
<td class='center' style='white-space:nowrap'>
<div>
<button class='btn btn-default' type='submit' name='edit[{$row2['gsitemap_id']}]' value='edit' src='".ADMIN_EDIT_ICON_PATH."' alt='".LAN_EDIT."' title='".LAN_EDIT."' style='border:0px' />
<button class='btn btn-default' type='submit' name='edit[{$row2['gsitemap_id']}]' value='edit' alt='".LAN_EDIT."' title='".LAN_EDIT."' style='border:0px' >".ADMIN_EDIT_ICON."</button>
<button class='btn btn-default action delete' type='submit' name='delete[{$row2['gsitemap_id']}]' value='del' data-confirm='".$tp->toJS(LAN_CONFIRMDEL." [".$row2['gsitemap_name']."]")."' title='".LAN_DELETE."' >".ADMIN_DELETE_ICON."</button>
</div>
</td>

View File

@@ -4,10 +4,10 @@
<description lan="LAN_PLUGIN_GSITEMAP_DESCRIPTION">Generates a Google Sitemap</description>
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
<adminLinks>
<link url='admin_config.php' description='Configure feature box' icon='images/icon.png' iconSmall='images/icon_16.png' primary='true' >Configure Sitemap</link>
<link url='admin_config.php' description='Configure gSitemap' icon='images/icon.png' iconSmall='images/icon_16.png' primary='true' >LAN_CONFIGURE</link>
</adminLinks>
<siteLinks>
<link name="" url="gsitemap.php?show" lan="GSLAN_Name">Sitemap</link>
<link name="" url="gsitemap.php?show" sef="sitemap" lan="GSLAN_Name">Sitemap</link>
</siteLinks>
<pluginPrefs>
</pluginPrefs>

View File

@@ -21,14 +21,13 @@ if(!plugInstalled('gsitemap'))
exit();
}
include_lan(e_PLUGIN."gsitemap/languages/gsitemap_".e_LANGUAGE.".php");
e107::lan('gsitemap');
if(e_QUERY == "show")
{
require_once(HEADERF);
$sql -> db_Select("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ");
$nfArray = $sql -> db_getList();
$nfArray = $sql ->retrieve("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ",true);
$text = "<div style='text-align:left'><ul>";
foreach($nfArray as $nfa)
@@ -44,14 +43,14 @@ if(e_QUERY == "show")
exit;
}
header('Content-type: application/xml', TRUE);
$xml = "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd'>";
$sql -> db_Select("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ");
$smArray = $sql -> db_getList();
$smArray = $sql ->retrieve("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ",true);
foreach($smArray as $sm)
{
if($sm['gsitemap_url'][0] == '/') $sm['gsitemap_url'] = ltrim($sm['gsitemap_url'], '/');