mirror of
https://github.com/e107inc/e107.git
synced 2025-08-26 15:54:43 +02:00
Code clean-up (global pointers, $e107->, headers). Got rid of all $e107->this->sql and tp
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id$
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Siteinfo shortcode batch
|
||||
*/
|
||||
@@ -11,16 +10,14 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
{
|
||||
function sc_sitebutton()
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
$path = ($_POST['sitebutton'] && $_POST['ajax_used']) ? $e107->tp->replaceConstants($_POST['sitebutton']) : (strstr(SITEBUTTON, 'http:') ? SITEBUTTON : e_IMAGE.SITEBUTTON);
|
||||
$path = ($_POST['sitebutton'] && $_POST['ajax_used']) ? e107::getParser()->replaceConstants($_POST['sitebutton']) : (strstr(SITEBUTTON, 'http:') ? SITEBUTTON : e_IMAGE.SITEBUTTON);
|
||||
//TODO use CSS class?
|
||||
return '<a href="'.SITEURL.'"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
|
||||
}
|
||||
|
||||
function sc_sitedisclaimer()
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
return $e107->tp->toHtml(SITEDISCLAIMER, true, 'constants defs');
|
||||
return e107::getParser()->toHtml(SITEDISCLAIMER, true, 'constants defs');
|
||||
}
|
||||
|
||||
function sc_sitename($parm)
|
||||
@@ -69,7 +66,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if(vartrue($logopref) && is_readable($logop))
|
||||
{
|
||||
$logo = $tp->replaceConstants($logopref,'abs');
|
||||
@@ -90,7 +87,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
$logo = e_IMAGE_ABS.'logo.png'; // HTML path
|
||||
$path = e_IMAGE.'logo.png'; // PHP path
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//TODO Parm for resizing the logo image with thumb.php
|
||||
|
Reference in New Issue
Block a user