summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-08-08 17:41:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-08-08 17:41:37 -0300
commit7aae76004ab712a1b32a340234fad6f0637a49cb (patch)
tree581e6104a401cc68aade07a8f23fffc41507a79e
downloadcalendario-7aae76004ab712a1b32a340234fad6f0637a49cb.tar.gz
calendario-7aae76004ab712a1b32a340234fad6f0637a49cb.tar.bz2
Initial import
-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');
+}