aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/views/default/bookmarks/bookmarklet.php
blob: 5cb8ca6d80bf7ed8aca2c811cff31dc3a45a2652 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
 * Elgg get bookmarks bookmarklet view
 *
 * @package ElggBookmarks
 */

$page_owner = elgg_get_page_owner();
$bookmarktext = elgg_echo("bookmarks:this");

if ($page_owner instanceof ElggGroup) {
	$bookmarktext = sprintf(elgg_echo("bookmarks:this:group"), $page_owner->name);
	$name = "group:$page_owner->guid";
} else {
	$name = $page_owner->username;
}

if (!$name && ($user = get_loggedin_user())) {
	$name = $user->username;
}

?>
<h3><?php echo elgg_echo('bookmarks:browser_bookmarklet')?></h3>
<a href="javascript:location.href='<?php echo elgg_get_site_url(); ?>pg/bookmarks/<?php echo $name; ?>/add?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"> <img src="<?php echo elgg_get_site_url(); ?>_graphics/elgg_bookmarklet.gif" border="0" title="<?php echo elgg_echo('bookmarks:this');?>" /> </a>
<br />
<a class="link" onclick="elgg_slide_toggle(this,'#elgg_sidebar','.bookmarklet');">Instructions</a>

<div class="bookmarklet hidden">
	<p><?php echo elgg_echo("bookmarks:bookmarklet:description"); ?></p>
	<p><?php echo elgg_echo("bookmarks:bookmarklet:descriptionie"); ?></p>
	<p><?php echo elgg_echo("bookmarks:bookmarklet:description:conclusion"); ?></p>
</div>