diff --git a/e107_plugins/gsitemap/admin_config.php b/e107_plugins/gsitemap/admin_config.php index 6a984c28a..7260ee099 100644 --- a/e107_plugins/gsitemap/admin_config.php +++ b/e107_plugins/gsitemap/admin_config.php @@ -1,26 +1,28 @@ tablerender("
".GSLAN_24."
", $text); } -/*+----------------------#######################################################################################---------------------+*/ function editSme() { @@ -180,7 +178,7 @@ class gsitemap } } -/*+----------------------#######################################################################################---------------------+*/ + function doForm($editArray=FALSE) { @@ -230,7 +228,8 @@ class gsitemap \n"; - for ($i=0.1; $i<1.0; $i=$i+0.1) { + for ($i=0.1; $i<1.0; $i=$i+0.1) + { $sel = ($editArray['gsitemap_priority'] == number_format($i,1))? "selected='selected'" : ""; $text .= "\n"; }; @@ -423,15 +429,14 @@ class gsitemap

- @@ -443,11 +448,11 @@ class gsitemap $ns -> tablerender("
".GSLAN_7."
", $text); } -/*+----------------------#######################################################################################---------------------+*/ + function importLink() { - global $sql, $tp; + global $sql, $tp, $admin_log; foreach($_POST['importid'] as $import) { list($name, $url, $type) = explode("^", $import); @@ -456,9 +461,10 @@ class gsitemap $sql -> db_Insert("gsitemap", "0, '$name', '$url', '".time()."', '".$_POST['import_freq']."', '".$_POST['import_priority']."', '$type', '0', '', '0' "); } $this -> message = count($_POST['importid'])." link(s) imported."; + $admin_log->log_event('GSMAP_01',$this->message, E_LOG_INFORMATIVE,''); } -/*+----------------------#######################################################################################---------------------+*/ + function instructions() { @@ -475,18 +481,16 @@ class gsitemap "; $ns -> tablerender("
".GSLAN_32."
", $text); - } -/*+----------------------#######################################################################################---------------------+*/ - } require_once(e_ADMIN."footer.php"); -function admin_config_adminmenu() { +function admin_config_adminmenu() +{ $action = (e_QUERY) ? e_QUERY : "list"; $var['list']['text'] = GSLAN_20; $var['list']['link'] = e_SELF; diff --git a/e107_plugins/gsitemap/e_cron.php b/e107_plugins/gsitemap/e_cron.php index 692f7242d..08f8f07c2 100644 --- a/e107_plugins/gsitemap/e_cron.php +++ b/e107_plugins/gsitemap/e_cron.php @@ -1,6 +1,25 @@ register("newspost", "pingit"); - $e_event->register("newsupd", "pingit"); +// $e_event->register("newspost", "pingit"); +// $e_event->register("newsupd", "pingit"); // Disable these for now, until admin functions written function pingit($vals) { diff --git a/e107_plugins/gsitemap/languages/English_admin_gsitemap.php b/e107_plugins/gsitemap/languages/English_admin_gsitemap.php new file mode 100644 index 000000000..1dffb53e3 --- /dev/null +++ b/e107_plugins/gsitemap/languages/English_admin_gsitemap.php @@ -0,0 +1,70 @@ +https://www.google.com/webmasters/sitemaps/stats and enter the following URL -> ".SITEURL."gsitemap.php - 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 http://www.google.com/webmasters/sitemaps/docs/en/protocol.html."); +define("GSLAN_39", "No links in sitemap - import sitelinks?"); +define("GSLAN_40", "Google Sitemap Entries"); +define('GSLAN_41', "Google Sitemap. For more information on the Google Sitemap protocol, go to http://www.google.com/webmasters/sitemaps/docs/en/protocol.html"); +define('GSLAN_42', 'Installation Successful..'); + +// Admin log messages +//------------------- +define('LAN_AL_GSMAP_01', 'Import sitelinks'); +define('LAN_AL_GSMAP_02', 'Sitemap link deleted'); +define('LAN_AL_GSMAP_03', 'Sitemap link added'); +define('LAN_AL_GSMAP_04', 'Sitemap link updated'); +define('LAN_AL_GSMAP_05', ''); + + +?> \ No newline at end of file diff --git a/e107_plugins/gsitemap/languages/gsitemap_English.php b/e107_plugins/gsitemap/languages/gsitemap_English.php index 7315b8ff0..0380e5db7 100644 --- a/e107_plugins/gsitemap/languages/gsitemap_English.php +++ b/e107_plugins/gsitemap/languages/gsitemap_English.php @@ -1,22 +1,22 @@ http://www.google.com/webmasters/sitemaps/docs/en/protocol.html."); define("GSLAN_39", "No links in sitemap - import sitelinks?"); define("GSLAN_40", "Google Sitemap Entries"); +*/ ?> \ No newline at end of file diff --git a/e107_plugins/gsitemap/plugin.php b/e107_plugins/gsitemap/plugin.php deleted file mode 100644 index 3a568634a..000000000 --- a/e107_plugins/gsitemap/plugin.php +++ /dev/null @@ -1,98 +0,0 @@ -http://www.google.com/webmasters/sitemaps/docs/en/protocol.html"; -$eplug_compatible = "e107 v0.7"; -$eplug_readme = ""; // leave blank if no readme file - -// Name of the plugin's folder ------------------------------------------------------------------------------------- -$eplug_folder = "gsitemap"; - -// Mane of menu item for plugin ---------------------------------------------------------------------------------- - $eplug_menu_name = ""; - -// Name of the admin configuration file -------------------------------------------------------------------------- -$eplug_conffile = "admin_config.php"; - -// Icon image and caption text ------------------------------------------------------------------------------------ -$eplug_icon = $eplug_folder."/images/icon.png"; -$eplug_icon_small = $eplug_folder."/images/icon_16.png"; -$eplug_logo = $eplug_folder."/images/icon.png"; - -$eplug_caption = "Configure Sitemap"; - -// List of preferences ----------------------------------------------------------------------------------------------- -$eplug_prefs = ""; -$eplug_module = TRUE; -$eplug_table_names = array("gsitemap"); - - -// List of sql requests to create tables ----------------------------------------------------------------------------- -$eplug_tables = array(" -CREATE TABLE ".MPREFIX."gsitemap ( - gsitemap_id int(11) unsigned NOT NULL auto_increment, - gsitemap_name varchar(200) NOT NULL default '', - gsitemap_url varchar(200) NOT NULL default '', - gsitemap_lastmod varchar(15) NOT NULL default '', - gsitemap_freq varchar(10) NOT NULL default '', - gsitemap_priority char(3) NOT NULL default '', - gsitemap_cat varchar(100) NOT NULL default '', - gsitemap_order int(3) NOT NULL default '0', - gsitemap_img varchar(50) NOT NULL default '', - gsitemap_active int(3) NOT NULL default '0', - PRIMARY KEY (gsitemap_id) -) TYPE=MyISAM;" -); - - -// Create a link in main menu (yes=TRUE, no=FALSE) ------------------------------------------------------------- -$eplug_link = TRUE; -$eplug_link_name = "Sitemap"; -$eplug_link_url = "gsitemap.php?show"; - - -// Text to display after plugin successfully installed ------------------------------------------------------------------ -$eplug_done = "Installation Successful.."; - -$eplug_uninstall_done = "You should delete gsitemap.php from your root directory."; - -// upgrading ... // - -$upgrade_add_prefs = ""; - -$upgrade_remove_prefs = ""; - -$upgrade_alter_tables = ""; - -$eplug_upgrade_done = ""; - - - - - - -?> \ No newline at end of file diff --git a/e107_plugins/gsitemap/plugin.xml b/e107_plugins/gsitemap/plugin.xml new file mode 100644 index 000000000..23e4c1ac2 --- /dev/null +++ b/e107_plugins/gsitemap/plugin.xml @@ -0,0 +1,21 @@ + + + + + + + GSLAN_41 + + gsitemap + Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt) + + admin_config.php + images/icon.png + images/icon_16.png + Configure Sitemap + GSLAN_42 + + + + + \ No newline at end of file diff --git a/e107_plugins/gsitemap/weblog_pinger.php b/e107_plugins/gsitemap/weblog_pinger.php index f3b691d8f..9f822e47c 100644 --- a/e107_plugins/gsitemap/weblog_pinger.php +++ b/e107_plugins/gsitemap/weblog_pinger.php @@ -38,6 +38,13 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +if(!plugInstalled('gsitemap')) +{ + header("location:".e_BASE."index.php"); + exit(); +} + + // include the XML-RPC class library require_once('xmlrpc/xmlrpc.inc');