summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkonstantin.komelin2012-09-16 07:11:46 (GMT)
committerMattias Axelsson2012-09-16 07:11:46 (GMT)
commitb3200bf4b2f8fa894359e095c4d38bb219345800 (patch)
tree8d05dcdd382e1adda0102946c2da9a7325e8adb9
parent2b435d32836d5317de5e5ecb17c10ccc540585c7 (diff)
Issue #1241834 by konstantin.komelin: Theme setting for This site is powered by.
-rw-r--r--page.tpl.php13
-rw-r--r--simpleclean.info1
-rw-r--r--theme-settings.php33
3 files changed, 33 insertions, 14 deletions
diff --git a/page.tpl.php b/page.tpl.php
index bbba186..25c0d25 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -156,12 +156,13 @@
<?php if ($page['footer']): ?>
<?php print render($page['footer']); ?>
- <?php endif; ?>
-
- <div id="footer">
- <p>This site is powered by <a href="http://drupal.org/">Drupal</a>. Theme: <a href="http://drupal.org/project/simpleclean">Simple Clean</a> by <a href="http://drupal.org/user/765764">acke</a> @ <a href="http://www.happiness.se/">happiness</a>.</p>
- <?php // Feel free to remove credits if you want your site even cleaner ;) /acke ?>
- </div>
+ <?php endif; ?>
+
+ <?php if (theme_get_setting('simpleclean_appreciation')): ?>
+ <div id="footer">
+ <p>This site is powered by <a href="http://drupal.org/">Drupal</a>. Theme: <a href="http://drupal.org/project/simpleclean">Simple Clean</a> by <a href="http://drupal.org/user/765764">acke</a> @ <a href="http://www.happiness.se/">happiness</a>.</p>
+ </div>
+ <?php endif; ?>
</div>
<div class="clear"></div>
diff --git a/simpleclean.info b/simpleclean.info
index 02571d9..9b3f212 100644
--- a/simpleclean.info
+++ b/simpleclean.info
@@ -29,3 +29,4 @@ features[] = node_user_picture
; SETTINGS
settings[simpleclean_mission] = ''
+settings[simpleclean_appreciation] = 1
diff --git a/theme-settings.php b/theme-settings.php
index d3740a2..c0ad19c 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -1,14 +1,14 @@
<?php
/**
-* @file
-* Implementation of THEMEHOOK_settings() function.
-*
-* @param $saved_settings
-* array An array of saved settings for this theme.
-* @return
-* array A form array.
-*/
+ * @file Simple Clean theme settings.
+ */
+/**
+ * Implements hook_form_system_theme_settings_alter().
+ *
+ * @param $form
+ * @param $form_state
+ */
function simpleclean_form_system_theme_settings_alter(&$form, $form_state) {
$form['simpleclean_mission'] = array(
'#type' => 'textfield',
@@ -18,4 +18,21 @@ function simpleclean_form_system_theme_settings_alter(&$form, $form_state) {
'#description' => t('Specify the text for the mission statement visable on frontpage. Leave it empty if you dont want a mission statement or if you want to use blocks instead.'),
'#weight' => -2,
);
+
+ $form['additional_settings'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Additional settings')
+ );
+
+ $form['additional_settings']['simpleclean_appreciation'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Say Thanks to !author_profile @ !author_company_site for the !theme_page theme.',
+ array(
+ '!theme_page' => l('Simple Clean', 'http://drupal.org/project/simpleclean', array('attributes' => array('target' => '_blank'))),
+ '!author_profile' => l('acke', 'http://drupal.org/user/765764', array('attributes' => array('target' => '_blank'))),
+ '!author_company_site' => l('happiness', 'http://www.happiness.se/', array('attributes' => array('target' => '_blank')))
+ )),
+ '#default_value' => theme_get_setting('simpleclean_appreciation'),
+ '#description' => t('Please demonstrate your appreciation for the developer by including credits into the footer of the site.')
+ );
}