1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Fixes #4703 - Google sitemap instructions updated.

This commit is contained in:
Cameron 2022-03-14 15:43:11 -07:00
parent 057cc8e35b
commit 4f88719159
2 changed files with 34 additions and 17 deletions

View File

@ -19,7 +19,7 @@ if(!getperms("P") || !e107::isInstalled('gsitemap'))
//require_once(e_HANDLER."userclass_class.php");
e107::lan('gsitemap',true);
e107::css('inline', '#admin-gsitemap-main-instructions .block-text ol > li { padding:1rem }');
class gsitemap_adminArea extends e_admin_dispatcher
@ -41,7 +41,7 @@ class gsitemap_adminArea extends e_admin_dispatcher
protected $adminMenu = array(
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'),
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'),
'main/create' => array('caption'=> GSLAN_22, 'perm' => 'P'),
'main/div0' => array('divider'=> true),
'main/import' => array('caption'=> 'Import', 'perm' => 'P'),
@ -182,10 +182,6 @@ class gsitemap_ui extends e_admin_ui
// left-panel help menu area. (replaces e_help.php used in old plugins)
public function renderHelp()
{
$caption = LAN_HELP;
$text = 'Some help text';
// return array('caption'=>$caption,'text'=> $text);
}
@ -377,14 +373,32 @@ class gsitemap_ui extends e_admin_ui
$ns = e107::getRender();
$LINK_1 = "https://www.google.com/accounts/ServiceLogin?service=sitemaps";
$LINK_1 = "https://search.google.com/search-console/";
$LINK_2 = "http://www.google.com/support/webmasters/?hl=en";
$srch[0] = "[URL]";
$repl[0] = "<a href='".$LINK_1."'>".$LINK_1."</a>";
$repl[0] = "<a href='".$LINK_1."' target='_blank'>".$LINK_1."</a>";
$srch[1] = "[URL2]";
$repl[1] = "<blockquote><b>".SITEURL."gsitemap.php</b></blockquote>";
$addons = e107::getAddonConfig('e_gsitemap', 'gsitemap');
$extraUrls = '';
foreach($addons as $plug => $item)
{
foreach($item as $data )
{
$lan = defset("GSLAN_51", "Auto-generated from [x]");
$key = $plug.'-'.$data['sef'];
$url = e107::url('gsitemap', $key, [], ['mode'=>'full']);
$extraUrls .= '<li><a href="'.$url.'" target="_blank">'.$url.'</a> <small><em>('.str_replace('[x]', $plug, $lan).')</em></small></li>';
}
}
$srch[1] = "[SITEMAP_URLS]";
$repl[1] = "<ul style='margin:10px'><li><a href='".SITEURL."sitemap.xml' target='_blank'>".SITEURL."sitemap.xml</a></li>".$extraUrls."</ul>";
$srch[2] = "[";
$repl[2] = "<a href='".e_ADMIN."prefs.php'>";
@ -392,15 +406,17 @@ class gsitemap_ui extends e_admin_ui
$srch[3] = "]";
$repl[3] = "</a>";
$default = "Once you have some entries, go to [URL] and enter one of the following URLs in the Sitemaps section.[SITEMAP_URLS] If any of these urls look incorrect to you, please make sure your site url is correct in [preferences].";
// $text = "<b>".GSLAN_33."</b><br /><br />";
$text = "
<ul>
<ol>
<li>".GSLAN_34."</li>
<li>".GSLAN_35."</li>
<li>".GSLAN_36."</li>
<li>".str_replace($srch,$repl,GSLAN_37)."</li>
<li>".str_replace("[URL]","<a href='".$LINK_2."'>".$LINK_2."</a>",GSLAN_38)."</li>
<ul>
<li>".str_replace($srch,$repl,defset("GSLAN_52", $default))."</li>
<li>".str_replace("[URL]","<a href='".$LINK_2."' target='_blank'>".$LINK_2."</a>",GSLAN_38)."</li>
</ol>
";
return $text;
@ -1016,14 +1032,14 @@ class gsitemap
$ns = e107::getRender();
$LINK_1 = "https://www.google.com/accounts/ServiceLogin?service=sitemaps";
$LINK_1 = "https://search.google.com/search-console/";
$LINK_2 = "http://www.google.com/support/webmasters/?hl=en";
$srch[0] = "[URL]";
$repl[0] = "<a href='".$LINK_1."'>".$LINK_1."</a>";
$srch[1] = "[URL2]";
$repl[1] = "<blockquote><b>".SITEURL."gsitemap.php</b></blockquote>";
$repl[1] = "<blockquote><b>".SITEURL."sitemap.xml</b></blockquote>";
$srch[2] = "[";
$repl[2] = "<a href='".e_ADMIN."prefs.php'>";

View File

@ -44,7 +44,6 @@ define("GSLAN_33", "GSiteMap Instructions");
define("GSLAN_34", "First, create the links you wish to have listed in your sitemap. You can import most of your links by clicking the 'Import' button on the right");
define("GSLAN_35", "If you've chosen to import your links, click 'Import' and then check the links you wish to import");
define("GSLAN_36", "You can also enter individual links manually by clicking 'Create New Entry'");
define("GSLAN_37", "Once you have some entries, go to [URL] and enter the following URL -> <b>".SITEURL."gsitemap.php</b> - if this url doesn't look right to you, please make sure your site url is correct in admin -> preferences");
define("GSLAN_38", "For more information on Google Sitemap protocol, go to [URL].");
define("GSLAN_39", "No links in sitemap - import sitelinks?");
// define("GSLAN_40", "Google Sitemap Entries");
@ -63,5 +62,7 @@ define("GSLAN_39", "No links in sitemap - import sitelinks?");
//define('GSLAN_42', 'Installation Successful..');
define("GSLAN_50", "Publicly visible");
define("GSLAN_51", "Auto-generated from [x]");
define("GSLAN_52", "Once you have some entries, go to [URL] and enter one of the following URLs in the Sitemaps section.[SITEMAP_URLS] (If any of these urls look incorrect to you, please make sure your site url is correct in [preferences].)");