mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
Linkwords Issue corrected.
This commit is contained in:
@@ -49,7 +49,8 @@ class e107plugin
|
|||||||
'e_url',
|
'e_url',
|
||||||
'e_cron',
|
'e_cron',
|
||||||
'e_mailout',
|
'e_mailout',
|
||||||
'e_sitelink'
|
'e_sitelink',
|
||||||
|
'e_tohtml'
|
||||||
);
|
);
|
||||||
|
|
||||||
// List of all plugin variables which need to be checked - install required if one or more set and non-empty
|
// List of all plugin variables which need to be checked - install required if one or more set and non-empty
|
||||||
|
@@ -32,6 +32,7 @@ if (!defined('e107_INIT')) { exit; }
|
|||||||
|
|
||||||
define('LW_CACHE_ENABLE', TRUE);
|
define('LW_CACHE_ENABLE', TRUE);
|
||||||
|
|
||||||
|
|
||||||
class e_tohtml_linkwords
|
class e_tohtml_linkwords
|
||||||
{
|
{
|
||||||
var $lw_enabled = FALSE; // Default to disabled to start
|
var $lw_enabled = FALSE; // Default to disabled to start
|
||||||
@@ -49,6 +50,7 @@ class e_tohtml_linkwords
|
|||||||
/* constructor */
|
/* constructor */
|
||||||
function e_tohtml_linkwords()
|
function e_tohtml_linkwords()
|
||||||
{
|
{
|
||||||
|
|
||||||
global $pref, $tp, $e107;
|
global $pref, $tp, $e107;
|
||||||
// See whether they should be active on this page - if not, no point doing anything!
|
// See whether they should be active on this page - if not, no point doing anything!
|
||||||
if ((strpos(e_SELF, ADMINDIR) !== FALSE) || (strpos(e_PAGE, "admin_") !== FALSE)) return; // No linkwords on admin directories
|
if ((strpos(e_SELF, ADMINDIR) !== FALSE) || (strpos(e_PAGE, "admin_") !== FALSE)) return; // No linkwords on admin directories
|
||||||
@@ -74,7 +76,7 @@ class e_tohtml_linkwords
|
|||||||
|
|
||||||
// Will probably need linkwords on this page - so get the info
|
// Will probably need linkwords on this page - so get the info
|
||||||
define('LW_CACHE_TAG', 'nomd5_linkwords'); // Put it here to avoid conflict on admin pages
|
define('LW_CACHE_TAG', 'nomd5_linkwords'); // Put it here to avoid conflict on admin pages
|
||||||
if (LW_CACHE_ENABLE && ($temp = $e107->ecache->retrieve_sys(LW_CACHE_TAG)))
|
if (LW_CACHE_ENABLE && ($temp = e107::getCache()->retrieve_sys(LW_CACHE_TAG)))
|
||||||
{
|
{
|
||||||
$ret = eval($temp);
|
$ret = eval($temp);
|
||||||
if ($ret)
|
if ($ret)
|
||||||
@@ -141,6 +143,7 @@ class e_tohtml_linkwords
|
|||||||
|
|
||||||
function to_html($text,$area = 'olddefault')
|
function to_html($text,$area = 'olddefault')
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!$this->lw_enabled || !array_key_exists($area,$this->area_opts) || !$this->area_opts[$area]) return $text; // No linkwords in disabled areas
|
if (!$this->lw_enabled || !array_key_exists($area,$this->area_opts) || !$this->area_opts[$area]) return $text; // No linkwords in disabled areas
|
||||||
|
|
||||||
// Split up by HTML tags and process the odd bits here
|
// Split up by HTML tags and process the odd bits here
|
||||||
|
Reference in New Issue
Block a user