1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +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'> <td class='center' style='white-space:nowrap'>
<div> <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> <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> </div>
</td> </td>

View File

@@ -4,10 +4,10 @@
<description lan="LAN_PLUGIN_GSITEMAP_DESCRIPTION">Generates a Google Sitemap</description> <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> <copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
<adminLinks> <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> </adminLinks>
<siteLinks> <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> </siteLinks>
<pluginPrefs> <pluginPrefs>
</pluginPrefs> </pluginPrefs>

View File

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