From eb3ffe89f4cdbe4c326e1b1bceabe18c13bd0ca0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 23 Sep 2011 17:40:24 -0300 Subject: Adding powered block --- CREDITS.txt | 5 ++++ images/capitalism-kills.orig.png | Bin 0 -> 23482 bytes images/capitalism-kills.png | Bin 0 -> 4974 bytes images/druplicon.png | Bin 0 -> 13927 bytes images/earth-recycle.orig.png | Bin 0 -> 172072 bytes images/earth-recycle.png | Bin 0 -> 25443 bytes images/money-back-sticker.orig.png | Bin 0 -> 129191 bytes images/money-back-sticker.png | Bin 0 -> 23603 bytes images/waiting.orig.png | Bin 0 -> 38325 bytes images/waiting.png | Bin 0 -> 7225 bytes muamba-powered.tpl.php | 46 +++++++++++++++++++++++++++++++++++++ muamba.css | 7 ++++++ muamba.misc.inc | 3 +++ muamba.module | 33 ++++++++++++++++++++++++++ muamba.theme.inc | 6 +++++ 15 files changed, 100 insertions(+) create mode 100644 images/capitalism-kills.orig.png create mode 100644 images/capitalism-kills.png create mode 100644 images/druplicon.png create mode 100644 images/earth-recycle.orig.png create mode 100644 images/earth-recycle.png create mode 100644 images/money-back-sticker.orig.png create mode 100644 images/money-back-sticker.png create mode 100644 images/waiting.orig.png create mode 100644 images/waiting.png create mode 100644 muamba-powered.tpl.php create mode 100644 muamba.theme.inc diff --git a/CREDITS.txt b/CREDITS.txt index 6a501ac..5db5305 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -4,6 +4,11 @@ Credits Images ------ +https://drupal.org/node/9068 http://www.openclipart.org/detail/146119/cardboard-box-by-lekamie http://www.openclipart.org/detail/87799/download-package-by-kuba http://www.openclipart.org/detail/74179/community-by-russel +http://www.openclipart.org/detail/23920/sandglass-by-anonymous-23920 +http://www.openclipart.org/detail/103339/money-back-guarantee-sticker-by-vectorportal +http://www.openclipart.org/detail/152557/capitalism-kills-by-worker-152557 +http://www.openclipart.org/detail/2213/crystal-earth-recycle-by-kuba diff --git a/images/capitalism-kills.orig.png b/images/capitalism-kills.orig.png new file mode 100644 index 0000000..badf93b Binary files /dev/null and b/images/capitalism-kills.orig.png differ diff --git a/images/capitalism-kills.png b/images/capitalism-kills.png new file mode 100644 index 0000000..5492993 Binary files /dev/null and b/images/capitalism-kills.png differ diff --git a/images/druplicon.png b/images/druplicon.png new file mode 100644 index 0000000..765d7ab Binary files /dev/null and b/images/druplicon.png differ diff --git a/images/earth-recycle.orig.png b/images/earth-recycle.orig.png new file mode 100644 index 0000000..661fbe4 Binary files /dev/null and b/images/earth-recycle.orig.png differ diff --git a/images/earth-recycle.png b/images/earth-recycle.png new file mode 100644 index 0000000..fab563e Binary files /dev/null and b/images/earth-recycle.png differ diff --git a/images/money-back-sticker.orig.png b/images/money-back-sticker.orig.png new file mode 100644 index 0000000..be43ecd Binary files /dev/null and b/images/money-back-sticker.orig.png differ diff --git a/images/money-back-sticker.png b/images/money-back-sticker.png new file mode 100644 index 0000000..9d48891 Binary files /dev/null and b/images/money-back-sticker.png differ diff --git a/images/waiting.orig.png b/images/waiting.orig.png new file mode 100644 index 0000000..837f996 Binary files /dev/null and b/images/waiting.orig.png differ diff --git a/images/waiting.png b/images/waiting.png new file mode 100644 index 0000000..fa7e4cb Binary files /dev/null and b/images/waiting.png differ diff --git a/muamba-powered.tpl.php b/muamba-powered.tpl.php new file mode 100644 index 0000000..587bce5 --- /dev/null +++ b/muamba-powered.tpl.php @@ -0,0 +1,46 @@ +'; + +print theme('image', + array( + 'path' => $path .'/images/money-back-sticker.png', + 'alt' => t('Money back guarantee'), + 'title' => t('Money back guarantee'), + ) +); + +print theme('image', + array( + 'path' => $path .'/images/druplicon.png', + 'alt' => t('Powered by Drupal'), + 'title' => t('Powered by Drupal'), + ) +); + +print theme('image', + array( + 'path' => $path .'/images/earth-recycle.png', + 'alt' => t('Saving resources'), + 'title' => t('Saving resources'), + ) +); + +print theme('image', + array( + 'path' => $path .'/images/capitalism-kills.png', + 'alt' => t('Capitalism kills'), + 'title' => t('Capitalism kills'), + ) +); + +print ''; diff --git a/muamba.css b/muamba.css index e69de29..8957be6 100644 --- a/muamba.css +++ b/muamba.css @@ -0,0 +1,7 @@ +.muamba-powered { + text-align: center; +} + +.muamba-powered img { + padding: 10px 10px 10px 10px; +} diff --git a/muamba.misc.inc b/muamba.misc.inc index 03fe8ed..4168464 100644 --- a/muamba.misc.inc +++ b/muamba.misc.inc @@ -12,5 +12,8 @@ * Requested item. */ function muamba_request($nid) { + // Sanitize + $nid = (int) $nid; + return t('You have requested an item'); } diff --git a/muamba.module b/muamba.module index 96882d6..1a94da2 100644 --- a/muamba.module +++ b/muamba.module @@ -68,5 +68,38 @@ function muamba_theme($existing, $type, $theme, $path) { 'template' => 'muamba-widget', 'variables' => array('nid' => NULL), ), + 'muamba_powered' => array( + 'template' => 'muamba-powered', + ), ); } + +/** + * Implements hook_block_info() + */ +function muamba_block_info() { + $blocks['muamba_powered'] = array( + 'info' => t('Muamba powered'), + 'cache' => DRUPAL_NO_CACHE, + 'status' => TRUE, + 'region' => 'footer', + ); + + return $blocks; +} + +/** + * Implements hook_block_view() + */ +function muamba_block_view($delta = '') { + $block = array(); + + switch ($delta) { + case 'muamba_powered': + $block['subject'] = t("You're welcome"); + $block['content'] = theme('muamba_powered'); + break; + + } + return $block; +} diff --git a/muamba.theme.inc b/muamba.theme.inc new file mode 100644 index 0000000..056632f --- /dev/null +++ b/muamba.theme.inc @@ -0,0 +1,6 @@ +