]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
license block and move theme stuff
authorEvan Prodromou <evan@prodromou.name>
Tue, 20 May 2008 17:13:53 +0000 (13:13 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 20 May 2008 17:13:53 +0000 (13:13 -0400)
darcs-hash:20080520171353-84dde-5a04033ee8ef19da25ffa9e5c68d2cb18fc71b04.gz

lib/common.php
lib/util.php

index ea83682ea733174f849007f12aea31ecb43bf4ea..82a29a001be2acd10e7971f0ca597150f3c84635 100644 (file)
@@ -40,6 +40,9 @@ $config =
                array('name' => 'Just another Laconica microblog',
                          'server' => 'localhost',
                          'path' => '/'),
+               'license' =>
+               array('url' => 'http://creativecommons.org/license/by/3.0/',
+                         'title' => 'Creative Commons Attribution 3.0'),
                'avatar' =>
                array('directory' => INSTALLDIR . '/avatar',
                          'path' => '/avatar')
index 5ba457b5b2d89def231961b0b9adc7df1c90ec45..2b88357f894056a601bc0e0826401d287aecdda2 100644 (file)
@@ -92,14 +92,38 @@ function common_show_header($pagetitle) {
 }
 
 function common_show_footer() {
-       global $xw;
+       global $xw, $config;
        common_foot_menu();
+       common_license_block();
        common_element_end('body');
        common_element_end('html');
        $xw->endDocument();
        $xw->flush();
 }
 
+function common_text($txt) {
+       global $xw;
+       $xw->text($txt);
+}
+
+function common_license_block() {
+       global $config, $xw;
+       common_element_start('div', 'license');
+       common_element_start('a', array('class' => 'license',
+                                                                       'rel' => 'license',
+                                                                       href => $config['license']['url']));
+       common_element('img', array('class' => 'license',
+                                                               'src' => $config['license']['image']));
+       common_element_end('a');
+       common_text(_t('Unless otherwise specified, contents of this site are copyright by the contributors and available under the '));
+       common_element('a', array('class' => 'license',
+                                                         'rel' => 'license',
+                                                         href => $config['license']['url']),
+                                  $config['license']['name']);
+       common_text(_t('. Contributors should be attributed by full name or nickname.'));
+       common_element_end('div');
+}
+
 function common_head_menu() {
        $user = common_current_user();
        common_element_start('ul', 'headmenu');