Multilingual multiuser multiblog engine
Home
About
Demo
Download
Hosting
Extend
Docs
Support
b2evolution Technical Documentation (Version 2.4)
[
class tree: plugins
] [
index: plugins
] [
all elements
]
Source for file _autolinks.plugin.php
Documentation is available at
_autolinks.plugin.php
<?php
/**
* This file implements the Automatic Links plugin for b2evolution
*
* b2evolution -
{@link http://b2evolution.net/}
* Released under GNU GPL License -
{@link http://b2evolution.net/about/license.html}
*
@copyright
(c)2003-2008 by Francois PLANQUE -
{@link http://fplanque.net/}
*
*
@package
plugins
*/
if
(
!
defined
(
'EVO_MAIN_INIT'
) )
die
(
'Please, do not access this page directly.'
)
;
/**
* Automatic links plugin.
*
*
@todo
dh> Provide a setting for:
* - marking external and internal (relative URL or on the blog's URL) links with a HTML/CSS class
* - add e.g. 'target="_blank"' to external links
*
@todo
Add "max. displayed length setting" and add full title + dots in the middle to shorten it.
* (e.g. plain long URLs with a lot of params and such). This should not cause the layout to
* behave ugly. This should only shorten non-whitespace strings in the link's innerHTML of course.
*
*
@package
plugins
*/
class
autolinks_plugin
extends
Plugin
{
var
$code
=
'b2evALnk'
;
var
$name
=
'Auto Links'
;
var
$priority
=
60
;
var
$version
=
'1.9-dev'
;
var
$apply_rendering
=
'opt-out'
;
var
$group
=
'rendering'
;
var
$short_desc
;
var
$long_desc
;
var
$number_of_installs
=
1
;
/**
* Init
*/
function
PluginInit
(
&
$params
)
{
$this
->
short_desc
=
T_
(
'Make URLs clickable'
)
;
$this
->
long_desc
=
T_
(
'This renderer will detect URLs in the text and automatically transform them into clickable links.'
)
;
}
/**
* Perform rendering
*
*
@param
array
Associative array of parameters
* (Output format, see
{@link format_to_output()}
)
*
@return
boolean
true if we can render something for the required output format
*/
function
RenderItemAsHtml
(
&
$params
)
{
$content
=
&
$params
[
'data'
]
;
$content
=
make_clickable
(
$content
)
;
return
true
;
}
}
/*
* $Log: _autolinks.plugin.php,v $
* Revision 1.19 2008/01/21 09:35:38 fplanque
* (c) 2008
*
* Revision 1.18 2007/06/16 20:20:53 blueyed
* Added todo for ... in links
*
* Revision 1.17 2007/04/26 00:11:04 fplanque
* (c) 2007
*
* Revision 1.16 2007/04/20 02:53:13 fplanque
* limited number of installs
*
* Revision 1.15 2007/01/17 21:41:05 blueyed
* todo for useful settings/features
*
* Revision 1.14 2006/12/26 03:19:12 fplanque
* assigned a few significant plugin groups
*
* Revision 1.13 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.12 2006/07/07 21:26:49 blueyed
* Bumped to 1.9-dev
*
* Revision 1.11 2006/07/06 19:56:29 fplanque
* no message
*
* Revision 1.10 2006/06/16 21:30:57 fplanque
* Started clean numbering of plugin versions (feel free do add dots...)
*
* Revision 1.9 2006/05/30 19:39:55 fplanque
* plugin cleanup
*
* Revision 1.8 2006/04/11 21:22:26 fplanque
* partial cleanup
*
*/
?>
plugins
Todo List
Packages
main
admin
admin-skin
conf
evocore
evoskins
htsrv
install
libs
plugins
xmlsrv
Documentation generated on Sat, 06 Mar 2010 03:27:20 +0100 by
phpDocumentor 1.4.2
. This site is hosted and maintained by
Daniel HAHLER
(
Contact
).