]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
default avatar
authorEvan Prodromou <evan@prodromou.name>
Wed, 21 May 2008 11:57:27 +0000 (07:57 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 21 May 2008 11:57:27 +0000 (07:57 -0400)
darcs-hash:20080521115727-84dde-73b58873e08c936139bd63cffab0c30883c9f8a5.gz

actions/showstream.php
actions/subscribed.php
actions/subscriptions.php
doc/TODO
lib/common.php
lib/stream.php

index 5a04e9f4712c5c32f5fefb5403b9f771f296c75f..30930de25a64351ce052b62f6cd192f12bbe06ed 100644 (file)
@@ -143,7 +143,8 @@ class ShowstreamAction extends StreamAction {
        }
 
        function show_subscriptions($profile) {
-
+               global $config;
+               
                # XXX: add a limit
                $subs = $profile->getLink('id', 'subscription', 'subscriber');
 
@@ -166,7 +167,7 @@ class ShowstreamAction extends StreamAction {
                                                                                                'href' => $subs->profileurl,
                                                                                                'class' => 'subscription'));
                                $avatar = $subs->getAvatar(AVATAR_MINI_SIZE);
-                               common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_MINI_AVATAR),
+                               common_element('img', array('src' => (($avatar) ? $avatar->url : $config['avatar']['default']['mini']),
                                                                                        'width' => AVATAR_MINI_SIZE,
                                                                                        'height' => AVATAR_MINI_SIZE,
                                                                                        'class' => 'avatar mini',
index 160267838927b8f0ff47ab471fc52da6927292a2..659118fb978ffd6530b0e491f90ae93a60f5a0c4 100644 (file)
@@ -42,7 +42,8 @@ class SubscribedAction extends Action {
        }
 
        function show_subscribed($profile, $page) {
-
+               global $config;
+               
                $subs = DB_DataObject::factory('subscription');
                $subs->subscribed = $profile->id;
 
@@ -68,7 +69,7 @@ class SubscribedAction extends Action {
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
                        $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
-                       common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
+                       common_element('img', array('src' => (($avatar) ? $avatar->url : $config['avatar']['default']['stream']),
                                                                                'width' => AVATAR_STREAM_SIZE,
                                                                                'height' => AVATAR_STREAM_SIZE,
                                                                                'class' => 'avatar stream',
index 37ed68a7f89abbfc21a7cd20041fc622a5498fa9..c15bd53109bd386b377a6ee20728fd6234898899 100644 (file)
@@ -65,13 +65,16 @@ class SubscriptionsAction extends Action {
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
                        $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
-                       common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
-                                                                               'width' => AVATAR_STREAM_SIZE,
-                                                                               'height' => AVATAR_STREAM_SIZE,
-                                                                               'class' => 'avatar stream',
-                                                                               'alt' => ($subs->fullname) ?
-                                                                               $subs->fullname :
-                                                                               $subs->nickname));
+                       common_element('img', 
+                                                  array('src' => 
+                                                                (($avatar) ? $avatar->url : 
+                                                                 $config['avatar']['default']['stream']),
+                                                                'width' => AVATAR_STREAM_SIZE,
+                                                                'height' => AVATAR_STREAM_SIZE,
+                                                                'class' => 'avatar stream',
+                                                                'alt' => ($subs->fullname) ?
+                                                                $subs->fullname :
+                                                                $subs->nickname));
                        common_element_end('a');
 
                        # XXX: subscribe form here
index f5609a35c8d48b8d1d8f3ccd83e159342bf180e9..8691b50729b17e6d531e8d8ca4da8bf74f7178fa 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -30,7 +30,7 @@
 + add H2 for each page section
 - doc action
 + default to public stream
-- default avatar
++ default avatar
 + default HTML type
 + set Content-Type
 + show current values in profile settings
@@ -43,8 +43,8 @@
 + validate newnotice form results
 + remove validation code from classes
 + use only canonical usernames
-- use only canonical email addresses
 - RSS 1.0 feeds of a user's notices
+- RSS 1.0 feeds of a user's notices + friends
 - RSS 1.0 dump of a user's notices
 - RSS 1.0 feed of all public notices
 - RDF dump of entire site
 - license on showstream
 - license on shownotice
 - TOS checkbox on register
-- pretty URLs
 - instructions
 - deal with PHP quotes escaping
 + fix layout of textarea
 + make notices into "big links"
 - fix spacing on notices
+- fix spacing in profile
 - limit entry in textarea to 140 chars
 - add a next page link to showstream
 - add a next page link to public
 - add a next page link to all
+- source link in footer menu
+- AGPL notification
 - release 0.2
+- pretty URLs
+- use only canonical email addresses
 - license per notice
 - allow mixed-case usernames
 - allow non-latin usernames
index 66de209d66d1d9fdd9868380962cdf14a70e9475..a9fef15f34ad4e96f653773db421e95124292bdf 100644 (file)
@@ -45,7 +45,11 @@ $config =
                          'image' => 'http://i.creativecommons.org/l/by/3.0/88x31.png'),
                'avatar' =>
                array('directory' => INSTALLDIR . '/avatar',
-                         'path' => '/avatar')
+                         'path' => '/avatar',
+                         'default' => 
+                         array('profile' => INSTALLDIR .'theme/default/image/default-avatar-profile.png',
+                                       'stream' => INSTALLDIR .'theme/default/image/default-avatar-stream.png',
+                                       'mini' => INSTALLDIR .'theme/default/image/default-avatar-mini.png'))
 );
 
 $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');
index 18b80d89816bf2169366a4cada42b70b6de12fcb..f5fcf226c7968f2e7b61377dd8e6ccf98f0fd76e 100644 (file)
@@ -34,7 +34,7 @@ class StreamAction extends Action {
                                                                                  'id' => 'notice-' . $notice->id));
                $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
                common_element_start('a', array('href' => $profile->profileurl));
-               common_element('img', array('src' => ($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR,
+               common_element('img', array('src' => ($avatar) ? $avatar->url : $config['avatar']['default']['stream'],
                                                                        'class' => 'avatar stream',
                                                                        'width' => AVATAR_STREAM_SIZE,
                                                                        'height' => AVATAR_STREAM_SIZE,