3 * @file mod/bookmarklet.php
6 use Friendica\Core\L10n;
7 use Friendica\Core\System;
8 use Friendica\Module\Login;
10 require_once 'include/conversation.php';
11 require_once 'include/items.php';
13 function bookmarklet_init()
15 $_GET["mode"] = "minimal";
18 function bookmarklet_content(App $a)
21 $o = '<h2>' . L10n::t('Login') . '</h2>';
22 $o .= Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? false : true);
26 $referer = normalise_link($_SERVER["HTTP_REFERER"]);
27 $page = normalise_link(System::baseUrl() . "/bookmarklet");
29 if (!strstr($referer, $page)) {
30 $content = add_page_info($_REQUEST["url"]);
34 'allow_location' => $a->user['allow_location'],
35 'default_location' => $a->user['default-location'],
36 'nickname' => $a->user['nickname'],
37 'lockstate' => ((is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))) ? 'lock' : 'unlock'),
38 'default_perms' => get_acl_permissions($a->user),
39 'acl' => populate_acl($a->user, true),
42 'profile_uid' => local_user(),
43 'title' => trim($_REQUEST["title"], "*"),
46 $o = status_editor($a, $x, 0, false);
47 $o .= "<script>window.resizeTo(800,550);</script>";
49 $o = '<h2>' . L10n::t('The post was created') . '</h2>';
50 $o .= "<script>window.close()</script>";