summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--calendario-embed-widget.tpl.php7
-rw-r--r--calendario.info4
-rw-r--r--calendario.module46
3 files changed, 57 insertions, 0 deletions
diff --git a/calendario-embed-widget.tpl.php b/calendario-embed-widget.tpl.php
new file mode 100644
index 0000000..17558cb
--- /dev/null
+++ b/calendario-embed-widget.tpl.php
@@ -0,0 +1,7 @@
+<strong>Este calendário no seu site:</strong><br />
+
+<pre>
+&lt;iframe src="https://calendario.sarava.org/pt-br/widgets/calendario/dia" width="630" height="800" style="border: none;"&gt;
+ &lt;a href="https://calendario.sarava.org/pt-br/widgets/calendario/dia"&gt;Calendário&lt;/a&gt;.
+&lt;/iframe&gt;
+</pre>
diff --git a/calendario.info b/calendario.info
new file mode 100644
index 0000000..944fabd
--- /dev/null
+++ b/calendario.info
@@ -0,0 +1,4 @@
+name = Calendario
+description = Calendario de Movimentos Sociais
+core = 7.x
+files[] = calendario.module
diff --git a/calendario.module b/calendario.module
new file mode 100644
index 0000000..5c7a4a4
--- /dev/null
+++ b/calendario.module
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * @file
+ * Calendario dos Movimentos Sociais.
+ */
+
+/**
+ * Implements hook_theme()
+ */
+function calendario_theme($existing, $type, $theme, $path) {
+ return array(
+ /*
+ *'forum_icon' => array(
+ * 'variables' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0),
+ *),
+ *'status_report' => array(
+ * 'render element' => 'requirements',
+ * 'file' => 'system.admin.inc',
+ *),
+ */
+ 'embed-widget' => array(
+ 'template' => 'calendario-embed-widget',
+ 'variables' => array('' => NULL, '' => NULL),
+ ),
+ );
+}
+
+/**
+ * Implements hook_entity_info_alter()
+ */
+function calendario_entity_info_alter(&$entity_info) {
+ // Set the controller class for nodes to an alternate implementation of the
+ // DrupalEntityController interface.
+ /*
+ *$entity_info['node']['controller class'] = 'MyCustomNodeController';
+ */
+ /* Your code here */
+}
+
+/**
+ * Include a calendar widget.
+ */
+function calendario_widget($view = NULL) {
+ return theme('embed-widget');
+}