Source for file _bookmarklet.plugin.php
Documentation is available at _bookmarklet.plugin.php
* This file implements the Bookmarket plugin.
* This file is part of the b2evolution project - {@link http://b2evolution.net/}
* @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/}
* @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
* @author fplanque: Francois PLANQUE - {@link http://fplanque.net/}
* @author cafelog (team) - http://cafelog.com/
* @version $Id: _bookmarklet.plugin.php,v 1.15.2.3 2006/12/06 23:26:04 blueyed Exp $
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
* Adds a tool allowing blogging from the sidebar
var $name =
'Bookmarklet';
$this->long_desc =
T_('Adds a tool allowing blogging through a bookmarklet.');
* We are displaying the tool menu.
* @todo Do not create links/javascript code based on browser detection! But: test for functionality!
* @param array Associative array of parameters
* @return boolean did we display a tool menu block?
if( $Hit->is_NS4 ||
$Hit->is_gecko )
<p>
<?php echo
T_('Add this link to your Favorites/Bookmarks:') ?><br />
<a href="javascript:Q=document.selection?document.selection.createRange().text:document.getSelection();void(window.open('
<?php echo
$admin_url ?>?ctrl=edit&mode=bookmarklet&content='+escape(Q)+'&post_url='+escape(location.href)+'&post_title='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));">
<?php echo
T_('b2evo bookmarklet') ?></a></p>
<p>
<?php echo
T_('Add this link to your Favorites/Bookmarks:') ?><br />
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('
<?php echo
$admin_url ?>?ctrl=edit&mode=bookmarklet&content='+escape(Q)+'&post_url='+escape(location.href)+'&post_title='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));btw.focus();">
<?php echo
T_('b2evo bookmarklet') ?></a>
<p>
<?php echo
T_('Add this link to your Favorites/Bookmarks:') ?><br />
<a href="javascript:void(window.open('
<?php echo
$admin_url ?>?ctrl=edit&mode=bookmarklet&post_url='+escape(location.href)+'&post_title='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));">
<?php echo
T_('b2evo bookmarklet') ?></a></p>
<p>
<?php echo
T_('Add this link to your Favorites/Bookmarks:') ?><br />
<a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('
<?php echo
$admin_url ?>?ctrl=edit&mode=bookmarklet&content='+escape(document.getSelection())+'&post_url='+escape(location.href)+'&post_title='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));btw.focus();">
<?php echo
T_('b2evo bookmarklet') ?></a></p>
* $Log: _bookmarklet.plugin.php,v $
* Revision 1.15.2.3 2006/12/06 23:26:04 blueyed
* MFH: fixed bookmarklet plugin (props Danny)
* Revision 1.15.2.2 2006/11/04 19:55:11 fplanque
* Reinjected old Log blocks. Removing them from CVS was a bad idea -- especially since Daniel has decided branch 1.9 was his HEAD...
* Revision 1.15 2006/07/10 20:19:30 blueyed
* Fixed PluginInit behaviour. It now gets called on both installed and non-installed Plugins, but with the "is_installed" param appropriately set.
* Revision 1.14 2006/07/07 21:26:49 blueyed
* Revision 1.13 2006/07/06 19:56:29 fplanque
* Revision 1.12 2006/06/16 21:30:57 fplanque
* Started clean numbering of plugin versions (feel free do add dots...)
* Revision 1.11 2006/05/30 19:39:55 fplanque
* Revision 1.10 2006/05/19 15:59:52 blueyed
* Fixed bookmarklet plugin. Thanks to personman for pointing it out.
* Revision 1.9 2006/04/11 21:22:26 fplanque