Browse Source

Merge pull request #1536 from jloguercio/1.11.x

WIP - Google Maps plugin - Refs BT#11371
José Loguercio 8 years ago
parent
commit
b8c0dfc322

+ 4 - 0
plugin/google_maps/README.md

@@ -0,0 +1,4 @@
+Google Maps Plugin
+===================
+
+Activa la funcionalidad de mostrar mapas usando el api de google maps

+ 9 - 0
plugin/google_maps/config.php

@@ -0,0 +1,9 @@
+<?php
+/* For licensing terms, see /license.txt */
+/**
+ * Config the plugin
+ * @author José Loguercio Silva <jose.loguercio@beeznest.com>
+ * @package chamilo.plugin.google_maps
+ */
+
+define('TABLE_GOOGLE_MAPS', 'plugin_google_maps');

+ 11 - 0
plugin/google_maps/index.php

@@ -0,0 +1,11 @@
+<?php
+/* For licensing terms, see /license.txt */
+/**
+ * Config the plugin
+ * @author José Loguercio Silva <jose.loguercio@beeznest.com>
+ * @package chamilo.plugin.google_maps
+ */
+require_once __DIR__ . '/config.php';
+
+$googleMapsPlugin = GoogleMapsPlugin::create();
+

+ 10 - 0
plugin/google_maps/install.php

@@ -0,0 +1,10 @@
+<?php
+/* For licensing terms, see /license.txt */
+/**
+ * Initialization install
+ * @author José Loguercio Silva <jose.loguercio@beeznest.com>
+ * @package chamilo.plugin.google_maps
+ */
+require_once __DIR__ . '/config.php';
+
+GoogleMapsPlugin::create()->install();

+ 4 - 0
plugin/google_maps/lang/english.php

@@ -0,0 +1,4 @@
+<?php
+
+$strings['plugin_title'] = "Google Maps";
+$strings['plugin_comment'] = "Active la fonctionnalité pour afficher Google Maps";

+ 4 - 0
plugin/google_maps/lang/french.php

@@ -0,0 +1,4 @@
+<?php
+
+$strings['plugin_title'] = "Google Maps";
+$strings['plugin_comment'] = "Active la fonctionnalité pour afficher Google Maps";

+ 4 - 0
plugin/google_maps/lang/spanish.php

@@ -0,0 +1,4 @@
+<?php
+
+$strings['plugin_title'] = "Google Maps";
+$strings['plugin_comment'] = "Enable the functionality to show google maps";

+ 10 - 0
plugin/google_maps/plugin.php

@@ -0,0 +1,10 @@
+<?php
+/* For licensing terms, see /license.txt */
+/**
+ * Show google maps
+ * @author José Loguercio Silva <jose.loguercio@beeznest.com>
+ * @package chamilo.plugin.google_maps
+ */
+require_once __DIR__.'/config.php';
+
+$plugin_info = GoogleMapsPlugin::create()->get_info();

+ 61 - 0
plugin/google_maps/src/GoogleMapsPluginPlugin.php

@@ -0,0 +1,61 @@
+<?php
+/* For licensing terms, see /license.txt */
+/**
+ * The google maps class allows to use
+ * @author José Loguercio Silva <jose.loguercio@beeznest.com>
+ * @package chamilo.plugin.google_maps
+ */
+class GoogleMapsPlugin extends Plugin
+{
+    /**
+     * Class constructor
+     */
+    protected function __construct()
+    {
+        $parameters = array(
+            'api_key' => 'text'
+        );
+
+        parent::__construct('1.0', 'José Loguercio Silva', $parameters);
+    }
+
+    /**
+     * Get the plugin Name
+     *
+     * @return string
+     */
+    public function get_name()
+    {
+        return "google_maps";
+    }
+
+    /**
+     * Instance the plugin
+     * @staticvar null $result
+     * @return GoogleMapsPlugin
+     */
+    static function create()
+    {
+        static $result = null;
+
+        return $result ? $result : $result = new self();
+    }
+
+    /**
+     * Install the plugin
+     * @return void
+     */
+    public function install()
+    {
+        return true;
+    }
+
+    /**
+     * Uninstall the plugin
+     * @return void
+     */
+    public function uninstall()
+    {
+        return true;
+    }
+}

+ 10 - 0
plugin/google_maps/uninstall.php

@@ -0,0 +1,10 @@
+<?php
+/* For licensing terms, see /license.txt */
+/**
+ * Initialization uninstall
+ * @author José Loguercio Silva <jose.loguercio@beeznest.com>
+ * @package chamilo.plugin.google_maps
+ */
+require_once __DIR__ . '/config.php';
+
+GoogleMapsPlugin::create()->uninstall();