From f0abc0fe15a54da468cf37e748041bba4f362e53 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 29 Oct 2009 13:18:51 +0100 Subject: Updated bookmarklet. Created its own action --- actions/bookmarklet.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 actions/bookmarklet.php (limited to 'actions') diff --git a/actions/bookmarklet.php b/actions/bookmarklet.php new file mode 100644 index 000000000..f253399e4 --- /dev/null +++ b/actions/bookmarklet.php @@ -0,0 +1,75 @@ +. + * + * @category Bookmarklet + * @package StatusNet + * @author Sarven Capadisli + * @copyright 2008-2009 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +if (!defined('STATUSNET') && !defined('LACONICA')) { + exit(1); +} + +require_once INSTALLDIR . '/actions/newnotice.php'; + +/** + * Action for posting a notice + * + * @category Bookmarklet + * @package StatusNet + * @author Sarven Capadisli + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://status.net/ + */ + +class BookmarkletAction extends NewnoticeAction +{ + function showTitle() + { + $this->element('title', null, _('Post to '.common_config('site', 'name'))); + } + + function showHeader() + { + $this->elementStart('div', array('id' => 'header')); + $this->elementStart('address'); + $this->element('a', array('class' => 'url', + 'href' => common_local_url('public')), + ''); + $this->elementEnd('address'); + if (common_logged_in()) { + $this->showNoticeForm(); + } + $this->elementEnd('div'); + } + + function showCore() + { + } + + function showFooter() + { + } +} + -- cgit v1.2.3-54-g00ecf