From 00d3d70a7db23851dcc0b8c0ec718d6a53c72337 Mon Sep 17 00:00:00 2001 From: "ken.sedgwick" Date: Fri, 13 Mar 2009 16:50:58 -0700 Subject: Fixed version issues in laconica RPM spec file. Fixed missing avatar directory in RPM packaging. --- scripts/laconica.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/laconica.spec b/scripts/laconica.spec index 2df41c932..502959fb1 100644 --- a/scripts/laconica.spec +++ b/scripts/laconica.spec @@ -1,11 +1,14 @@ +# This version needs to match the tarball and unpacked directory name. +%define LACVER 0.7.2.1 + BuildRequires: php-pear BuildRequires: httpd-devel Name: laconica -Version: 0.7.1 +Version: %{LACVER} Release: 1%{?dist} License: GAGPL v3 or later -Source: laconica-0.7.1.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 +* Fri Mar 13 2009 Ken Sedgwick - 0.7.2.1-1 +- Factored laconica version to the first line of the file. + +* Wed Mar 03 2009 Zach Copley - 0.7.2 +- Changed version number to 0.7.2. + * Sat Feb 28 2009 Ken Sedgwick - 0.7.1-1 - Modified RPM for Fedora. -- cgit v1.2.3-54-g00ecf From ab2946047cd08c6b66cbc57410fa8a99430530f6 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 3 Apr 2009 13:19:33 -0700 Subject: Only kill control and surrogates, leave UTF-8 formatting chars alone. --- lib/util.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/util.php b/lib/util.php index a43666fa5..11f0f297e 100644 --- a/lib/util.php +++ b/lib/util.php @@ -581,10 +581,8 @@ function common_shorten_link($url, $reverse = false) function common_xml_safe_str($str) { - $xmlStr = htmlentities(iconv('UTF-8', 'UTF-8//IGNORE', $str), ENT_NOQUOTES, 'UTF-8'); - - // Replace control, formatting, and surrogate characters with '*', ala Twitter - return preg_replace('/[\p{Cc}\p{Cf}\p{Cs}]/u', '*', $str); + // Neutralize control codes and surrogates + return preg_replace('/[\p{Cc}\p{Cs}]/u', '*', $str); } function common_tag_link($tag) -- cgit v1.2.3-54-g00ecf From e1fec6db2fdc9c28878c8f87bd5b55d1b1e5e1fa Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Fri, 3 Apr 2009 20:34:27 +0000 Subject: Simplified code for empty public timeline. --- actions/public.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/actions/public.php b/actions/public.php index fca90488f..5a2720a9a 100644 --- a/actions/public.php +++ b/actions/public.php @@ -168,14 +168,13 @@ class PublicAction extends Action function showPageNotice() { - $notice = Notice::publicStream(0, 1); + $notice = new Notice; if (!$notice) { $this->serverError(_('Could not retrieve public stream.')); return; } - // no notices in the public stream, let's get out of here if ($notice->count()) { return; } -- cgit v1.2.3-54-g00ecf From 96982477220316ee7af0326dc6ff42d2438b540e Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Fri, 3 Apr 2009 20:35:18 +0000 Subject: Added filler text to popular page for when it's empty, encouraging user to add favorites and/or register. --- actions/favorited.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/actions/favorited.php b/actions/favorited.php index 231b97897..20a354674 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -143,6 +143,25 @@ class FavoritedAction extends Action $this->elementStart('div', 'instructions'); $this->raw($output); $this->elementEnd('div'); + + $favorite = new Fave; + + if ($favorite->count()) { + return; + } + + $message = _('Favorite notices appear on this page but noone 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.'); + } + else { + $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!'); + } + + $this->elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); } /** -- cgit v1.2.3-54-g00ecf From 439d521c86e07fc7bc0c84e62022fc160f8f0fcf Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Fri, 3 Apr 2009 20:37:29 +0000 Subject: Tiny change to the public tag cloud dealing with empty page. --- actions/publictagcloud.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php index 5322372b2..5bc7e0cbf 100644 --- a/actions/publictagcloud.php +++ b/actions/publictagcloud.php @@ -63,7 +63,7 @@ class PublictagcloudAction extends Action sprintf(_('These are most popular recent tags on %s '), common_config('site', 'name'))); - $tags = new Notice_tag(); + $tags = new Notice_tag; if ($tags->count()) { return; } -- cgit v1.2.3-54-g00ecf From d83f6c32690b34a4aa283f8665c9fa2c4f7df185 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 3 Apr 2009 14:16:32 -0700 Subject: Add Yatca to notice sources --- db/notice_source.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/notice_source.sql b/db/notice_source.sql index d28a09383..5d48e66b6 100644 --- a/db/notice_source.sql +++ b/db/notice_source.sql @@ -45,4 +45,5 @@ VALUES ('twitux','Twitux','http://live.gnome.org/DanielMorales/Twitux', now()), ('twitvim','TwitVim','http://vim.sourceforge.net/scripts/script.php?script_id=2204', now()), ('urfastr','urfastr','http://urfastr.net/', now()), - ('adium', 'Adium', 'http://www.adiumx.com/', now()); + ('adium', 'Adium', 'http://www.adiumx.com/', now()), + ('yatca','Yatca','http://www.yatca.com/', now()); -- cgit v1.2.3-54-g00ecf From 61a08c91d5475a6eaedc56d999a8814b48a0fbb5 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 3 Apr 2009 15:59:08 -0700 Subject: Bumped version number for upcoming 0.7.3 release --- scripts/laconica.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/laconica.spec b/scripts/laconica.spec index 0e51237a2..331e10671 100644 --- a/scripts/laconica.spec +++ b/scripts/laconica.spec @@ -1,5 +1,5 @@ # This version needs to match the tarball and unpacked directory name. -%define LACVER 0.7.2.1 +%define LACVER 0.7.3 BuildRequires: php-pear BuildRequires: httpd-devel @@ -79,15 +79,15 @@ rm -rf %buildroot %config(noreplace) %{_sysconfdir}/httpd/conf.d/laconica.conf %changelog +* Wed Apr 03 2009 Zach Copley - 0.7.3 +- Changed version number to 0.7.3. + * Fri Mar 13 2009 Ken Sedgwick - 0.7.2.1-1 - Factored laconica version to the first line of the file. * Wed Mar 03 2009 Zach Copley - 0.7.2 - Changed version number to 0.7.2. -* Wed Mar 03 2009 Zach Copley - 0.7.2 -- Changed version number to 0.7.2. - * Sat Feb 28 2009 Ken Sedgwick - 0.7.1-1 - Modified RPM for Fedora. -- cgit v1.2.3-54-g00ecf From bd52139436ba6e43ead6fd6acff43a90a1224f04 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Sun, 5 Apr 2009 00:46:39 +0000 Subject: bookmarklet inspired by wordpress press this. --- doc-src/bookmarklet | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc-src/bookmarklet diff --git a/doc-src/bookmarklet b/doc-src/bookmarklet new file mode 100644 index 000000000..03c0e97c9 --- /dev/null +++ b/doc-src/bookmarklet @@ -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. + + +Post to %%site.name%% + + -- cgit v1.2.3-54-g00ecf From 1ee24a2aaf6d07f0f6ffd4697da88c43b140bd13 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Sun, 5 Apr 2009 23:11:40 +0000 Subject: added filler text to people search, suggesting other search options. --- actions/peoplesearch.php | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 9e515ade1..6fbb19b88 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -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,34 @@ 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.')); - $profile->free(); + $qe = urlencode($q); + $message = _(<<pagination($page > 1, $cnt > PROFILES_PER_PAGE, - $page, 'peoplesearch', array('q' => $q)); +You can also try your search on other engines: + +* [Twingly](http://www.twingly.com/search?q=$qe&content=microblog&site=identi.ca) +* [Tweet scan](http://www.tweetscan.com/indexi.php?s=$qe) +* [Google](http://www.google.com/search?q=site%3Aidenti.ca+$qe) +* [Yahoo](http://search.yahoo.com/search?p=site%3Aidenti.ca+$qe) + +E_O_T +); + $this->elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + $profile->free(); + } } } -- cgit v1.2.3-54-g00ecf From 84d2aa7df49dc85603dd6c2d60c1f605800a458c Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 6 Apr 2009 01:14:59 +0000 Subject: refactored search suggestions and added forgotten sprintf. --- actions/peoplesearch.php | 21 ++------------------- lib/searchaction.php | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 6fbb19b88..3ce719dd5 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -82,25 +82,8 @@ class PeoplesearchAction extends SearchAction } else { $this->element('p', 'error', _('No results.')); - $qe = urlencode($q); - $message = _(<<elementStart('div', 'blankfiller'); - $this->raw(common_markup_to_html($message)); - $this->elementEnd('div'); +//TODO + $this->searchSuggestions($q); $profile->free(); } } diff --git a/lib/searchaction.php b/lib/searchaction.php index c762db16f..697262ccd 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -133,5 +133,28 @@ class SearchAction extends Action $this->showResults($q, $page); } } + + function searchSuggestions($q) { + $qe = urlencode($q); + $message = sprintf(_(<<elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + } } -- cgit v1.2.3-54-g00ecf From 9ad8307b7ee60b3263733b8b8c3d7ac6f350a452 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 6 Apr 2009 05:04:11 +0000 Subject: external search now depends on site.server. --- actions/peoplesearch.php | 2 -- lib/searchaction.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 3ce719dd5..65d970dd1 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -81,8 +81,6 @@ class PeoplesearchAction extends SearchAction } else { $this->element('p', 'error', _('No results.')); - -//TODO $this->searchSuggestions($q); $profile->free(); } diff --git a/lib/searchaction.php b/lib/searchaction.php index 697262ccd..918f8dd9a 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -146,8 +146,8 @@ 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%%3Aidenti.ca+%s) -* [Yahoo](http://search.yahoo.com/search?p=site%%3Aidenti.ca+%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 -- cgit v1.2.3-54-g00ecf From 17fb51f747c023392cd6127abe9b019e693f0544 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Tue, 7 Apr 2009 03:26:33 +0000 Subject: added filler text to notice and group search, suggesting other search options. --- actions/groupsearch.php | 24 +++++++++++++++--------- actions/noticesearch.php | 21 +++++++++++++-------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/actions/groupsearch.php b/actions/groupsearch.php index 109a53ce1..31c4ffd94 100644 --- a/actions/groupsearch.php +++ b/actions/groupsearch.php @@ -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', 'blankfiller'); + $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, '\\1', htmlspecialchars($text)); } - - function isReadOnly() - { - return true; - } } diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 9058cf53c..a4308450b 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -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', 'blankfiller'); + $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 { -- cgit v1.2.3-54-g00ecf