]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.7.x' into 0.8.x
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 7 Apr 2009 21:14:23 +0000 (17:14 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 7 Apr 2009 21:14:23 +0000 (17:14 -0400)
16 files changed:
actions/all.php
actions/favorited.php
actions/groupsearch.php
actions/noticesearch.php
actions/peoplesearch.php
actions/public.php
actions/publictagcloud.php
db/notice_source.sql
doc-src/bookmarklet [new file with mode: 0644]
lib/action.php
lib/galleryaction.php
lib/searchaction.php
scripts/laconica.spec
theme/base/css/display.css
theme/default/css/display.css
theme/identica/css/display.css

index 8e67ec0f3b49eff9db6b6b7020762b952f9843da..9a163267049559d6c8229010580eec98634445fd 100644 (file)
@@ -93,6 +93,32 @@ class AllAction extends Action
         $nav->show();
     }
 
+    function showPageNotice()
+    {
+        $notice = $this->user->noticesWithFriends(0, 1);
+        if ($notice->count()) {
+            return;
+        }
+
+        $message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
+
+        if (common_logged_in()) {
+            $current_user = common_current_user();
+            if ($this->user->id === $current_user->id) {
+                $message .= _('Try subscribing to more people, [join a group](%%action.groups) or post something yourself.');
+            } else {
+                $message .= sprintf(_('You can try to [nudge %s](./) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, '@' . $this->user->nickname);
+            }
+        }
+        else {
+            $message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
+        }
+
+        $this->elementStart('div', 'guide');
+        $this->raw(common_markup_to_html($message));
+        $this->elementEnd('div');
+    }
+
     function showContent()
     {
         $notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
index 20a354674f4185cee36c7d18e7198691e914c442..27da25435b7921c8dc3972cfa88382838a475a12 100644 (file)
@@ -150,7 +150,7 @@ class FavoritedAction extends Action
             return;
         }
 
-        $message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' ';
+        $message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' ';
 
         if (common_logged_in()) {
             $message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
@@ -159,7 +159,7 @@ class FavoritedAction extends Action
             $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
         }
 
-        $this->elementStart('div', 'blankfiller');
+        $this->elementStart('div', 'guide');
         $this->raw(common_markup_to_html($message));
         $this->elementEnd('div');
     }
index 109a53ce112704a0ff6f92795fb703e1e1c53b06..06b4a77550cf33bd672207ace03e135e31754c93 100644 (file)
@@ -72,12 +72,23 @@ class GroupsearchAction extends SearchAction
             $terms = preg_split('/[\s,]+/', $q);
             $results = new GroupSearchResults($user_group, $terms, $this);
             $results->show();
+            $user_group->free();
+            $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
+                          $page, 'groupsearch', array('q' => $q));
         } else {
-            $this->element('p', 'error', _('No results'));
+            $this->element('p', 'error', _('No results.'));
+            $this->searchSuggestions($q);
+            if (common_logged_in()) {
+                $message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
+            }
+            else {
+                $message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
+            }
+            $this->elementStart('div', 'guide');
+            $this->raw(common_markup_to_html($message));
+            $this->elementEnd('div');
+            $user_group->free();
         }
-        $user_group->free();
-        $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
-                          $page, 'groupsearch', array('q' => $q));
     }
 }
 
@@ -98,10 +109,5 @@ class GroupSearchResults extends GroupList
     {
         return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
     }
-
-    function isReadOnly()
-    {
-        return true;
-    }
 }
 
index 9058cf53c302d83ab6af1fc66c9602b8b032f2e6..095d0a454a157ff96ddcc3137dea89ed89557233 100644 (file)
@@ -114,22 +114,27 @@ class NoticesearchAction extends SearchAction
             $cnt = $notice->find();
         }
         if ($cnt === 0) {
-            $this->element('p', 'error', _('No results'));
+            $this->element('p', 'error', _('No results.'));
+
+            $this->searchSuggestions($q);
+            if (common_logged_in()) {
+                $message = sprintf(_('Be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
+            }
+            else {
+                $message = sprintf(_('Why not [register an account](%%%%action.register%%%%) and be the first to  [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
+            }
+
+            $this->elementStart('div', 'guide');
+            $this->raw(common_markup_to_html($message));
+            $this->elementEnd('div');
             return;
         }
         $terms = preg_split('/[\s,]+/', $q);
         $nl = new SearchNoticeList($notice, $this, $terms);
-
         $cnt = $nl->show();
-
         $this->pagination($page > 1, $cnt > NOTICES_PER_PAGE,
                           $page, 'noticesearch', array('q' => $q));
     }
-
-    function isReadOnly()
-    {
-        return true;
-    }
 }
 
 class SearchNoticeList extends NoticeList {
index 9e515ade1a9e7b6d21bab32f18e3e9cf44bc5677..65d970dd159a7fea183763d9fd8488fdde4cb2ab 100644 (file)
@@ -60,14 +60,8 @@ class PeoplesearchAction extends SearchAction
 
     function showResults($q, $page)
     {
-
         $profile = new Profile();
-
-        // lcase it for comparison
-        // $q = strtolower($q);
-
         $search_engine = $profile->getSearchEngine('identica_people');
-
         $search_engine->set_sort_mode('chron');
         // Ask for an extra to see if there's more.
         $search_engine->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1);
@@ -81,14 +75,15 @@ class PeoplesearchAction extends SearchAction
             $terms = preg_split('/[\s,]+/', $q);
             $results = new PeopleSearchResults($profile, $terms, $this);
             $results->show();
+            $profile->free();
+            $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE,
+                          $page, 'peoplesearch', array('q' => $q));
+
         } else {
-            $this->element('p', 'error', _('No results'));
+            $this->element('p', 'error', _('No results.'));
+            $this->searchSuggestions($q);
+            $profile->free();
         }
-
-        $profile->free();
-
-        $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE,
-                          $page, 'peoplesearch', array('q' => $q));
     }
 }
 
index 5a2720a9ad919cdbb8442e3832c1c470908d5be2..b7b7fc6b767913e043cf7dea9a8d3e02ea169551 100644 (file)
@@ -179,7 +179,7 @@ class PublicAction extends Action
             return;
         }
 
-        $message = _('This is the public timeline for %%site.name%% but noone has posted anything yet.') . ' ';
+        $message = _('This is the public timeline for %%site.name%% but no one has posted anything yet.') . ' ';
 
         if (common_logged_in()) {
             $message .= _('Be the first to post!');
@@ -188,7 +188,7 @@ class PublicAction extends Action
             $message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
         }
 
-        $this->elementStart('div', 'blankfiller');
+        $this->elementStart('div', 'guide');
         $this->raw(common_markup_to_html($message));
         $this->elementEnd('div');
     }
index 5bc7e0cbffcf7a56a544e8cb8607aec864b53ef5..0cd8940d4d9346b746db14c4d9222874fa8e49b9 100644 (file)
@@ -68,7 +68,7 @@ class PublictagcloudAction extends Action
             return;
         }
 
-        $message = _('Noone has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' ';
+        $message = _('No one has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' ';
 
         if (common_logged_in()) {
             $message .= _('Be the first to post one!');
@@ -77,7 +77,7 @@ class PublictagcloudAction extends Action
             $message .= _('Why not [register an account](%%action.register%%) and be the first to post one!');
         }
 
-        $this->elementStart('div', 'blankfiller');
+        $this->elementStart('div', 'guide');
         $this->raw(common_markup_to_html($message));
         $this->elementEnd('div');
     }
index 5d48e66b62c987fea013d8a981aa4d442512f07b..52d555dbfe1cdc2f69c35b86fcf9382429d236d2 100644 (file)
@@ -21,6 +21,7 @@ VALUES
     ('mbpidgin','mbpidgin','http://code.google.com/p/microblog-purple/', now()),
     ('Mobidentica', 'Mobidentica', 'http://www.substanceofcode.com/software/mobidentica/', now()),
     ('moconica','Moconica','http://moconica.com/', now()),
+    ('peoplebrowsr', 'PeopleBrowsr', 'http://www.peoplebrowsr.com/', now()),
     ('pocketwit','PockeTwit','http://code.google.com/p/pocketwit/', now()),
     ('posty','Posty','http://spreadingfunkyness.com/posty/', now()),
     ('royalewithcheese','Royale With Cheese','http://p.hellyeah.org/', now()),
diff --git a/doc-src/bookmarklet b/doc-src/bookmarklet
new file mode 100644 (file)
index 0000000..03c0e97
--- /dev/null
@@ -0,0 +1,8 @@
+A bookmarklet is a small piece of javascript code used as a bookmark. This one will let you post to %%site.name%% simply by selecting some text on a page and pressing the bookmarklet.
+
+Drag-and-drop the following link to your bookmarks bar or right-click it and add it to your browser favorites to keep it handy.
+
+<MTMarkdownOptions output='raw'>
+<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/notice/new',l=d.location,e=encodeURIComponent,g=f+'?status_textarea=%22'+e(s)+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
+</MTMarkdownOptions>
+
index 75531d34b51a308bec75e393445ddcd9fbac452f..960a7cabfb083b347a6199d16e521fdc4c30cf03 100644 (file)
@@ -402,13 +402,8 @@ class Action extends HTMLOutputter // lawsuit
             if ($user) {
                 $this->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
                                 _('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
-            }
-            $this->menuItem(common_local_url('peoplesearch'),
-                            _('Search'), _('Search for people or text'), false, 'nav_search');
-            if ($user) {
                 $this->menuItem(common_local_url('profilesettings'),
                                 _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
-
                 if (common_config('xmpp', 'enabled')) {
                     $this->menuItem(common_local_url('imsettings'),
                                     _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
@@ -416,20 +411,28 @@ class Action extends HTMLOutputter // lawsuit
                     $this->menuItem(common_local_url('smssettings'),
                                     _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
                 }
+                $this->menuItem(common_local_url('invite'),
+                                 _('Invite'),
+                                 sprintf(_('Invite friends and colleagues to join you on %s'),
+                                 common_config('site', 'name')),
+                                 false, 'nav_invitecontact');
                 $this->menuItem(common_local_url('logout'),
                                 _('Logout'), _('Logout from the site'), false, 'nav_logout');
-            } else {
-                $this->menuItem(common_local_url('login'),
-                                _('Login'), _('Login to the site'), false, 'nav_login');
+            }
+            else {
                 if (!common_config('site', 'closed')) {
                     $this->menuItem(common_local_url('register'),
                                     _('Register'), _('Create an account'), false, 'nav_register');
                 }
                 $this->menuItem(common_local_url('openidlogin'),
                                 _('OpenID'), _('Login with OpenID'), false, 'nav_openid');
+                $this->menuItem(common_local_url('login'),
+                                _('Login'), _('Login to the site'), false, 'nav_login');
             }
             $this->menuItem(common_local_url('doc', array('title' => 'help')),
                             _('Help'), _('Help me!'), false, 'nav_help');
+            $this->menuItem(common_local_url('peoplesearch'),
+                            _('Search'), _('Search for people or text'), false, 'nav_search');
             Event::handle('EndPrimaryNav', array($this));
         }
         $this->elementEnd('ul');
@@ -923,11 +926,15 @@ class Action extends HTMLOutputter // lawsuit
      *
      * @return string current URL
      */
+
     function selfUrl()
     {
         $action = $this->trimmed('action');
         $args   = $this->args;
         unset($args['action']);
+        if (array_key_exists('submit', $args)) {
+            unset($args['submit']);
+        }
         foreach (array_keys($_COOKIE) as $cookie) {
             unset($args[$cookie]);
         }
index 25a5e3fd59dd52386eb25e3bd9bd94386e912aec..8e21d7393b082950a3113b7758e6f1a601a36ad3 100644 (file)
@@ -50,7 +50,7 @@ class GalleryAction extends Action
             if ($this->arg('page') && $this->arg('page') != 1) {
                 $args['page'] = $this->arg['page'];
             }
-            common_redirect(common_local_url('subscriptions', $args), 301);
+            common_redirect(common_local_url($this->trimmed('action'), $args), 301);
             return false;
         }
 
@@ -71,6 +71,7 @@ class GalleryAction extends Action
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
         $this->tag = $this->trimmed('tag');
+        $this->q   = $this->trimmed('q');
 
         return true;
     }
@@ -87,7 +88,7 @@ class GalleryAction extends Action
                # Post from the tag dropdown; redirect to a GET
 
                if ($_SERVER['REQUEST_METHOD'] == 'POST') {
-                   common_redirect($this->selfUrl(), 307);
+                   common_redirect($this->selfUrl(), 303);
             return;
                }
 
@@ -136,7 +137,7 @@ class GalleryAction extends Action
                                                'method' => 'post'));
             $this->dropdown('tag', _('Tag'), $content,
                             _('Choose a tag to narrow list'), false, $tag);
-            $this->submit('go', _('Go'));
+            $this->submit('submit', _('Go'));
             $this->elementEnd('form');
             $this->elementEnd('li');
             $this->elementEnd('ul');
index c762db16f049a7f84f3bee989c78d41148b8d2f2..e7ad4affdaab9eaac36e4fae6fe7c586443b9a1e 100644 (file)
@@ -133,5 +133,31 @@ class SearchAction extends Action
             $this->showResults($q, $page);
         }
     }
+
+    function searchSuggestions($q) {
+        $qe = urlencode($q);
+        $message = sprintf(_(<<<E_O_T
+* Make sure all words are spelled correctly.
+* Try different keywords.
+* Try more general keywords.
+* Try fewer keywords.
+
+You can also try your search on other engines:
+
+* [Twingly](http://www.twingly.com/search?q=%s&content=microblog&site=identi.ca)
+* [Tweet scan](http://www.tweetscan.com/indexi.php?s=%s)
+* [Google](http://www.google.com/search?q=site%%3A%%%%site.server%%%%+%s)
+* [Yahoo](http://search.yahoo.com/search?p=site%%3A%%%%site.server%%%%+%s)
+
+
+E_O_T
+), $qe, $qe, $qe, $qe);
+        $this->elementStart('dl', array('id' => 'help_search', 'class' => 'help'));
+        $this->element('dt', null, _('Search help'));
+        $this->elementStart('dd', 'instructions');
+        $this->raw(common_markup_to_html($message));
+        $this->elementEnd('dd');
+        $this->elementEnd('div');
+    }
 }
 
index 5f0ed5fa9298b1738aa16056f10451e165404a25..331e10671bb7cc7de0919875526696c196a0b28d 100644 (file)
@@ -1,11 +1,14 @@
+# This version needs to match the tarball and unpacked directory name.
+%define LACVER 0.7.3
+
 BuildRequires: php-pear
 BuildRequires: httpd-devel
 
 Name:           laconica
-Version:        0.7.2
+Version:        %{LACVER}
 Release:        1%{?dist}
 License:        GAGPL v3 or later
-Source:         laconica-0.7.2.tar.gz
+Source:         laconica-%{version}.tar.gz
 Group:          Applications/Internet
 Summary:        Laconica, the Open Source microblogging platform
 BuildArch:      noarch
@@ -49,6 +52,8 @@ cp -a * %{buildroot}%{wwwpath}
 mkdir -p %{buildroot}%{_datadir}/laconica
 cp -a db %{buildroot}%{_datadir}/laconica/db
 
+mkdir -p %{buildroot}%{_datadir}/laconica/avatar
+
 mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
 cat > %{buildroot}%{_sysconfdir}/httpd/conf.d/laconica.conf <<"EOF"
 Alias /laconica/ "/var/www/laconica/"
@@ -74,6 +79,12 @@ rm -rf %buildroot
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/laconica.conf
 
 %changelog
+* Wed Apr 03 2009 Zach Copley <zach@controlyourself.ca> - 0.7.3
+- Changed version number to 0.7.3.
+
+* Fri Mar 13 2009 Ken Sedgwick <ksedgwic@bonsai.com> - 0.7.2.1-1
+- Factored laconica version to the first line of the file.
+
 * Wed Mar 03 2009 Zach Copley <zach@controlyourself.ca> - 0.7.2
 - Changed version number to 0.7.2.
 
index 4c9b522549268d7d1a1af783ea6d029d6e0dd015..6c3c7e91272b8700d9362575d584305af184a57c 100644 (file)
@@ -83,12 +83,13 @@ left:0;
 border:0;
 }
 
-#page_notice .error,
-#page_notice .success {
+.error,
+.success {
 padding:4px 7px;
 border-radius:4px;
 -moz-border-radius:4px;
 -webkit-border-radius:4px;
+margin-bottom:18px;
 }
 form label.submit {
 display:none;
@@ -384,6 +385,7 @@ margin-bottom:1em;
 
 #content {
 width:64.009%;
+min-height:259px;
 padding:1.795%;
 float:left;
 border-radius:7px;
@@ -403,6 +405,7 @@ float:left;
 
 #aside_primary {
 width:27.917%;
+min-height:259px;
 float:left;
 margin-left:0.395%;
 padding:1.795%;
@@ -1143,4 +1146,13 @@ clear:both;
 margin-bottom:0;
 }
 
-
+.instructions ul {
+list-style-position:inside;
+}
+.instructions p,
+.instructions ul {
+margin-bottom:18px;
+}
+.help dt {
+display:none;
+}
index bf46fc6bfd503cc0a6bd5f2dd9900f8516981292..42e29374f1c571c2bd6deb6e421aea271b7955f5 100644 (file)
@@ -37,7 +37,6 @@ background:none;
 
 input.submit,
 #form_notice.warning #notice_text-count,
-#nav_register a,
 .form_settings .form_note,
 .entity_remote_subscribe {
 background-color:#A9BF4F;
@@ -48,7 +47,6 @@ input:focus, textarea:focus, select:focus,
 border-color:#A9BF4F;
 }
 input.submit,
-#nav_register a,
 .entity_remote_subscribe {
 color:#fff;
 }
@@ -97,13 +95,6 @@ cursor:wait;
 text-indent:-9999px;
 }
 
-
-#nav_register a {
-text-decoration:none;
-font-weight:bold;
-padding:2px 4px;
-}
-
 #content,
 #site_nav_local_views a,
 #aside_primary {
@@ -122,10 +113,10 @@ background-color:rgba(255, 255, 255, 0.7);
 }
 
 
-#page_notice .error {
+.error {
 background-color:#F7E8E8;
 }
-#page_notice .success {
+.success {
 background-color:#EFF3DC;
 }
 
index 9e7c10ac5a296dc8fab3e82e5bec5ae038dceac7..8edb005a68ae7b74b79c9619eae7c36e5a7dfd25 100644 (file)
@@ -37,7 +37,6 @@ background:none;
 
 input.submit,
 #form_notice.warning #notice_text-count,
-#nav_register a,
 .form_settings .form_note,
 .entity_remote_subscribe {
 background-color:#9BB43E;
@@ -48,7 +47,6 @@ input:focus, textarea:focus, select:focus,
 border-color:#9BB43E;
 }
 input.submit,
-#nav_register a,
 .entity_remote_subscribe {
 color:#fff;
 }
@@ -97,12 +95,6 @@ cursor:wait;
 text-indent:-9999px;
 }
 
-#nav_register a {
-text-decoration:none;
-font-weight:bold;
-padding:2px 4px;
-}
-
 #content,
 #site_nav_local_views a,
 #aside_primary {
@@ -121,10 +113,10 @@ background-color:rgba(255, 255, 255, 0.7);
 }
 
 
-#page_notice .error {
+.error {
 background-color:#F7E8E8;
 }
-#page_notice .success {
+.success {
 background-color:#EFF3DC;
 }