Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Ouput format: HTML
|
||||
* (Matt Mecham)
|
||||
* Last Updated: $Date: 2010-10-13 09:23:30 -0400 (Wed, 13 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-10-05 15:30:51 -0400 (Wed, 05 Oct 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 6966 $
|
||||
* @version $Revision: 9582 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -45,12 +45,19 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
*/
|
||||
protected $_css = array( 'import' => array(), 'inline' => array() );
|
||||
|
||||
/**
|
||||
* Use a minimal wrapper instead of globalTemplate
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $useMinimalWrapper = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Output object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( output $output )
|
||||
{
|
||||
@@ -58,7 +65,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
parent::__construct( $output );
|
||||
|
||||
/* Print only seems only relevant to html method, so... */
|
||||
if ( isset( $_GET['forcePrint'] ) AND $_GET['forcePrint'] AND ( $_GET['_k'] == $this->member->form_hash ) )
|
||||
if ( !empty( $_GET['forcePrint'] ) AND ( $_GET['_k'] == $this->member->form_hash ) )
|
||||
{
|
||||
$this->_printOnly = true;
|
||||
}
|
||||
@@ -68,7 +75,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
* Prints any header information for this output module
|
||||
*
|
||||
* @access public
|
||||
* @return void Prints header() information
|
||||
* @return @e void Prints header() information
|
||||
*/
|
||||
public function printHeader()
|
||||
{
|
||||
@@ -98,17 +105,17 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
print $buffer;
|
||||
}
|
||||
|
||||
if ( $this->settings['print_headers'] )
|
||||
{
|
||||
if ( isset( $_SERVER['SERVER_PROTOCOL'] ) AND strstr( $_SERVER['SERVER_PROTOCOL'], '/1.0' ) )
|
||||
{
|
||||
header("HTTP/1.0 " . $this->_headerCode . ' ' . $this->_headerStatus );
|
||||
}
|
||||
else
|
||||
{
|
||||
header("HTTP/1.1 " . $this->_headerCode . ' ' . $this->_headerStatus );
|
||||
}
|
||||
if ( isset( $_SERVER['SERVER_PROTOCOL'] ) AND strstr( $_SERVER['SERVER_PROTOCOL'], '/1.0' ) )
|
||||
{
|
||||
header("HTTP/1.0 " . $this->_headerCode . ' ' . $this->_headerStatus );
|
||||
}
|
||||
else
|
||||
{
|
||||
header("HTTP/1.1 " . $this->_headerCode . ' ' . $this->_headerStatus );
|
||||
}
|
||||
|
||||
if ( $this->settings['print_headers'] )
|
||||
{
|
||||
/* Forcing a download? */
|
||||
if ( $this->_forceDownload )
|
||||
{
|
||||
@@ -229,6 +236,8 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
*/
|
||||
public function displayBoardOffline( $message )
|
||||
{
|
||||
$this->useMinimalWrapper = true;
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('global_other')->displayBoardOffline( $message );
|
||||
}
|
||||
|
||||
@@ -250,8 +259,9 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$system_vars_cache = $this->caches['systemvars'];
|
||||
$pmData = FALSE;
|
||||
$system_vars_cache = $this->caches['systemvars'];
|
||||
$pmData = FALSE;
|
||||
$notificationLatest = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// NORMAL
|
||||
@@ -263,13 +273,11 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
// Do we have a notification show?
|
||||
//-----------------------------------------
|
||||
|
||||
$notifications = null;
|
||||
|
||||
if ( ! empty( $this->memberData['msg_show_notification'] ) AND $this->memberData['_cache']['show_notification_popup'] )
|
||||
{
|
||||
if ( !$this->settings['board_offline'] OR $this->memberData['g_access_offline'] )
|
||||
{
|
||||
if ( ! $this->settings['board_offline'] OR $this->memberData['g_access_offline'] )
|
||||
{
|
||||
if( strpos( ipsRegistry::$settings['query_string_real'], 'area=notificationlog' ) === false )
|
||||
if ( strpos( ipsRegistry::$settings['query_string_real'], 'module=messaging' ) === false )
|
||||
{
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'msg_show_notification' => 0 ) ) );
|
||||
|
||||
@@ -278,11 +286,12 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
$notifyLibrary = new $classToLoad( $this->registry );
|
||||
$notifyLibrary->setMember( $this->memberData );
|
||||
|
||||
$_data = $notifyLibrary->fetchUnreadNotifications( 1, 'notify_sent', 'DESC', true, true );
|
||||
|
||||
if ( count( $_data ) )
|
||||
$tmp = $notifyLibrary->getLatestNotificationForInlinePopUp();
|
||||
$weNeed = array( 'notify_title', 'member_member_id', 'member_PhotoTag', 'member_members_display_name', 'date_parsed', 'title', 'url', 'type', 'content' );
|
||||
|
||||
foreach( $weNeed as $k )
|
||||
{
|
||||
$notifications = array_shift( $_data );
|
||||
$notificationLatest[ $k ] = IPSText::utf8ToEntities( $tmp[ $k ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -307,35 +316,66 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
|
||||
$task = '';
|
||||
$system_vars_cache['task_next_run'] = isset( $system_vars_cache['task_next_run'] ) ? $system_vars_cache['task_next_run'] : 0;
|
||||
|
||||
|
||||
if ( time() >= $system_vars_cache['task_next_run'] OR ( defined('FORCE_TASK_KEY') ) )
|
||||
{
|
||||
$_url = ( ! $this->registry->getClass('output')->isHTTPS ) ? $this->settings['base_url'] : $this->settings['base_url_https'];
|
||||
$task = "<div><img src='" . $_url . "app=core&module=task' alt='' style='border: 0px;height:1px;width:1px;' /></div>";
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab output
|
||||
//-----------------------------------------
|
||||
|
||||
/* Inline msg */
|
||||
$inlineMsg = $this->member->sessionClass()->getInlineMessage();
|
||||
|
||||
$finalOutput = $this->output->getTemplate('global')->globalTemplate( $output, $documentHeadItems, $this->_css, $jsLoaderItems, $this->_metaTags,
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
'page' => $this->_current_page_title ),
|
||||
array( 'navigation' => $navigation,
|
||||
'notifications' => $notifications,
|
||||
'adHeaderCode' => ! empty( $extraData['adHeaderCode'] ) ? $extraData['adHeaderCode'] : '',
|
||||
'adFooterCode' => ! empty( $extraData['adFooterCode'] ) ? $extraData['adFooterCode'] : '' ),
|
||||
array( 'time' => $this->registry->getClass('class_localization')->getDate( time(), 'SHORT', 1 ),
|
||||
'lang_chooser' => $this->html_buildLanguageDropDown(),
|
||||
'skin_chooser' => $this->html_fetchSetsDropDown(),
|
||||
'copyright' => $this->html_fetchCopyright() ),
|
||||
array( 'ex_time' => ( isset($this->request['faster']) AND $this->request['faster'] == 'yes' ) ? $this->_getFasterText() : sprintf( "%.4f", IPSDebug::endTimer() ),
|
||||
'gzip_status' => ( $this->settings['disable_gzip'] == 1 ) ? $this->lang->words['gzip_off'] : $this->lang->words['gzip_on'],
|
||||
'server_load' => ipsRegistry::$server_load,
|
||||
'queries' => $this->DB->getQueryCount(),
|
||||
'task' => $task )
|
||||
);
|
||||
if ( $this->useMinimalWrapper )
|
||||
{
|
||||
$finalOutput = $this->output->getTemplate('global_other')->globalTemplateMinimal( $output, $documentHeadItems, $this->_css, $jsLoaderItems, $this->_metaTags,
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
'page' => $this->_current_page_title,
|
||||
'notifications' => ( $notificationLatest ) ? json_encode( $notificationLatest ) : '',
|
||||
'inlineMsg' => $inlineMsg ),
|
||||
array( 'navigation' => $navigation,
|
||||
'adHeaderCode' => ! empty( $extraData['adHeaderCode'] ) ? $extraData['adHeaderCode'] : '',
|
||||
'adFooterCode' => ! empty( $extraData['adFooterCode'] ) ? $extraData['adFooterCode'] : '' ),
|
||||
array( 'time' => $this->registry->getClass('class_localization')->getDate( time(), 'SHORT', 1 ),
|
||||
'mark_read_apps' => IPSLib::getEnabledApplications('itemMarking'),
|
||||
'lang_chooser' => $this->html_buildLanguageDropDown(),
|
||||
'skin_chooser' => $this->html_fetchSetsDropDown(),
|
||||
'copyright' => $this->html_fetchCopyright() ),
|
||||
array( 'ex_time' => ( isset($this->request['faster']) AND $this->request['faster'] == 'yes' ) ? $this->_getFasterText() : sprintf( "%.4f", IPSDebug::endTimer() ),
|
||||
'gzip_status' => ( $this->settings['disable_gzip'] == 1 ) ? $this->lang->words['gzip_off'] : $this->lang->words['gzip_on'],
|
||||
'server_load' => ipsRegistry::$server_load,
|
||||
'queries' => $this->DB->getQueryCount(),
|
||||
'task' => $task )
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$finalOutput = $this->output->getTemplate('global')->globalTemplate( $output, $documentHeadItems, $this->_css, $jsLoaderItems, $this->_metaTags,
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
'page' => $this->_current_page_title,
|
||||
'notifications' => ( $notificationLatest ) ? json_encode( $notificationLatest ) : '',
|
||||
'inlineMsg' => $inlineMsg ),
|
||||
array( 'navigation' => $navigation,
|
||||
'adHeaderCode' => ! empty( $extraData['adHeaderCode'] ) ? $extraData['adHeaderCode'] : '',
|
||||
'adFooterCode' => ! empty( $extraData['adFooterCode'] ) ? $extraData['adFooterCode'] : '' ),
|
||||
array( 'time' => $this->registry->getClass('class_localization')->getDate( time(), 'SHORT', 1 ),
|
||||
'mark_read_apps' => IPSLib::getEnabledApplications('itemMarking'),
|
||||
'lang_chooser' => $this->html_buildLanguageDropDown(),
|
||||
'skin_chooser' => $this->html_fetchSetsDropDown(),
|
||||
'copyright' => $this->html_fetchCopyright() ),
|
||||
array( 'ex_time' => ( isset($this->request['faster']) AND $this->request['faster'] == 'yes' ) ? $this->_getFasterText() : sprintf( "%.4f", IPSDebug::endTimer() ),
|
||||
'gzip_status' => ( $this->settings['disable_gzip'] == 1 ) ? $this->lang->words['gzip_off'] : $this->lang->words['gzip_on'],
|
||||
'server_load' => ipsRegistry::$server_load,
|
||||
'queries' => $this->DB->getQueryCount(),
|
||||
'task' => $task )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -377,8 +417,8 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
//-----------------------------------------
|
||||
// Return
|
||||
//-----------------------------------------
|
||||
//print IPSLib::sizeFormat( IPSLib::strlenToBytes( strlen( $finalOutput ) ) );
|
||||
return $this->parseIPSTags( $finalOutput );
|
||||
|
||||
return $finalOutput;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,57 +429,13 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
*/
|
||||
public function finishUp()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Memory usage
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPS_MEMORY_DEBUG_MODE AND defined( 'IPS_MEMORY_START' ) AND $this->memberData['g_access_cp'] )
|
||||
{
|
||||
if ( is_array( IPSDebug::$memory_debug ) )
|
||||
{
|
||||
$memory .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>MEMORY USAGE</div><div class='row1' style='padding:6px'>\n";
|
||||
$memory .= "<table cellpadding='4' cellspacing='0' border='0' width='100%'>\n";
|
||||
$_c = 0;
|
||||
|
||||
foreach( IPSDebug::$memory_debug as $usage )
|
||||
{
|
||||
$_col = ( $_c % 2 ) ? '#eee' : '#ddd';
|
||||
$_c++;
|
||||
|
||||
if ( $usage[1] > 500 * 1024 )
|
||||
{
|
||||
$_col .= ";color:#D00000";
|
||||
}
|
||||
else if ( $usage[1] < 10 * 1024 )
|
||||
{
|
||||
$_col .= ";color:darkgreen";
|
||||
}
|
||||
else if ( $usage[1] < 100 * 1024 )
|
||||
{
|
||||
$_col .= ";color:darkorange";
|
||||
}
|
||||
|
||||
$memory .= "<tr><td width='60%' style='background-color:{$_col}' align='left'>{$usage[0]}</td><td style='background-color:{$_col}' align='left'><strong>".IPSLib::sizeFormat( $usage[1] )."</strong></td></tr>";
|
||||
}
|
||||
|
||||
$memory .= "</table></div></div>";
|
||||
}
|
||||
|
||||
$end = memory_get_usage();
|
||||
$peak_end = function_exists('memory_get_peak_usage') ? memory_get_peak_usage() : memory_get_usage();
|
||||
$_used = $end - IPS_MEMORY_START;
|
||||
$peak_used = $peak_end - IPS_MEMORY_START;
|
||||
|
||||
print $memory;
|
||||
print "Total Memory Used: " . IPSLib::sizeFormat( $_used ) . " (Peak:" . IPSLib::sizeFormat( $peak_used ).")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds more items into the document header like CSS / RSS, etc
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function addHeadItems()
|
||||
{
|
||||
@@ -460,9 +456,13 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['attributes'] = 'media="screen"';
|
||||
$this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['attributes'] = 'media="screen,print"';
|
||||
}
|
||||
}
|
||||
else if ( $data['css_group'] == 'ipb_print' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['content'] = str_replace( 'http://', 'https://', $this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['content'] );
|
||||
}
|
||||
@@ -485,9 +485,13 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('output')->skin['_css'][ $name ]['attributes'] = 'media="screen"';
|
||||
$this->registry->getClass('output')->skin['_css'][ $name ]['attributes'] = 'media="screen,print"';
|
||||
}
|
||||
}
|
||||
else if ( $data['css_group'] == 'ipb_print' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Did we skip it? */
|
||||
if ( ! isset( $this->registry->getClass('output')->skin['_css'][ $name ] ) )
|
||||
@@ -501,13 +505,11 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $this->registry->getClass('output')->skin['set_css_inline'] AND @file_exists( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/style_css/'. $this->registry->getClass('output')->skin['_csscacheid'] .'/'. $name . '.css' ) )
|
||||
if ( ! SAFE_MODE_ON && $this->registry->getClass('output')->skin['set_css_inline'] AND @is_file( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/style_css/'. $this->registry->getClass('output')->skin['_csscacheid'] .'/'. $name . '.css' ) )
|
||||
{
|
||||
$_cssFile = $this->settings['public_dir'] . 'style_css/' . $this->registry->getClass('output')->skin['_csscacheid'] .'/'. $name . '.css';
|
||||
$this->_css['import'][$_cssFile] = array(
|
||||
'attributes' => $this->registry->getClass('output')->skin['_css'][ $name ]['attributes'],
|
||||
'content' => $_cssFile
|
||||
);
|
||||
$_cssFile = $this->settings['css_base_url'] . 'style_css/' . $this->registry->getClass('output')->skin['_csscacheid'] .'/'. $name . '.css';
|
||||
$this->_css['import'][$_cssFile] = array( 'attributes' => $this->registry->getClass('output')->skin['_css'][ $name ]['attributes'],
|
||||
'content' => $_cssFile );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -520,39 +522,18 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
// RSS
|
||||
//-----------------------------------------
|
||||
|
||||
$cacheUsed = false;
|
||||
$rssOutputCache = $this->cache->getCache('rss_output_cache');
|
||||
|
||||
if( is_array( $rssOutputCache ) AND count( $rssOutputCache ) )
|
||||
{
|
||||
$expires = array_shift( $rssOutputCache );
|
||||
foreach( $rssOutputCache as $rssEntry )
|
||||
{
|
||||
$data = explode( ':|:', $rssEntry );
|
||||
|
||||
if( time() < $expires )
|
||||
{
|
||||
foreach( $rssOutputCache as $rssEntry )
|
||||
if( $data[1] )
|
||||
{
|
||||
$data = explode( ':|:', $rssEntry );
|
||||
|
||||
$this->output->addToDocumentHead( 'rss', array( 'title' => $data[0], 'url' => $data[1] ) );
|
||||
}
|
||||
|
||||
$cacheUsed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->cache->rebuildCache( 'rss_output_cache' );
|
||||
|
||||
$rssOutputCache = $this->cache->getCache('rss_output_cache');
|
||||
|
||||
if( is_array( $rssOutputCache ) AND count( $rssOutputCache ) )
|
||||
{
|
||||
foreach( $rssOutputCache as $rssEntry )
|
||||
{
|
||||
$data = explode( ':|:', $rssEntry );
|
||||
|
||||
$this->output->addToDocumentHead( 'rss', array( 'title' => $data[0], 'url' => $data[1] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +568,10 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
|
||||
# Ensure &s are taken care of
|
||||
$url = str_replace( "&", "&", $url );
|
||||
|
||||
|
||||
# Dirty hack @todo look at real reason for this - happens when URL is already SEO and passed via buildSEOUrl above
|
||||
$url = str_replace( "?//", "?/", $url );
|
||||
|
||||
# 301?
|
||||
if ( $send301 === TRUE )
|
||||
{
|
||||
@@ -630,7 +614,6 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
* @access public
|
||||
* @param string
|
||||
* @return string
|
||||
* @todo [Future] Remove the legacy remapping in 3.1. We will assume posts have been rebuilt by then.
|
||||
*/
|
||||
public function parseIPSTags( $text )
|
||||
{
|
||||
@@ -644,19 +627,13 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
$text = str_replace( "{style_image_url}" , $this->settings['img_url'] , $text );
|
||||
$text = str_replace( "{style_images_url}" , $this->settings['img_url'] , $text );
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix legacy emoticon/avatar/images links
|
||||
//-----------------------------------------
|
||||
|
||||
$text = preg_replace( "#img\s+?src=([\"'])(?:{$this->settings['board_url']}[^\"']+?)?(?<!public%2F)style_(images|avatars|emoticons)([^\"']+?)[\"'](.+?)?".">#is", "img src=\\1".$this->settings['public_dir']."style_\\2\\3\\1\\4>", $text );
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up IPB image url
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->settings['ipb_img_url'] )
|
||||
{
|
||||
$text = preg_replace( '#img\s+?src=["\']public/style_(images|avatars|emoticons)(.+?)["\'](.+?)?' . '>#is', "img src=\"".$this->settings['ipb_img_url']."public/style_\\1\\2\"\\3>", $text );
|
||||
$text = preg_replace( '#img\s+?src=["\']' . PUBLIC_DIRECTORY . '/style_(images|avatars|emoticons)(.+?)["\'](.+?)?' . '>#is', "img src=\"".$this->settings['ipb_img_url'] . PUBLIC_DIRECTORY . "/style_\\1\\2\"\\3>", $text );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -674,10 +651,10 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
/**
|
||||
* Fetch copyright notice
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return string Copyright HTML
|
||||
*/
|
||||
private function html_fetchCopyright()
|
||||
protected function html_fetchCopyright()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// REMOVAL OF THIS WITHOUT PURCHASING COPYRIGHT REMOVAL WILL VIOLATE THE LICENCE YOU AGREED
|
||||
@@ -692,11 +669,11 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
/**
|
||||
* @link http://community.invisionpower.com/tracker/issue-23750-licensed-to-wont-work-if-copyright-removal-purchased/
|
||||
*/
|
||||
if ( $this->settings['ipb_reg_show'] and $this->settings['ipb_reg_name'] )
|
||||
if ( $this->settings['ipb_reg_name'] )
|
||||
{
|
||||
$copyright = "<!-- Copyright Information -->
|
||||
<p id='copyright'>" .
|
||||
$this->lang->words['licensed_to'] . $this->settings['ipb_reg_name'] .
|
||||
$this->lang->words['licensed_to'] . ' ' . $this->settings['ipb_reg_name'] .
|
||||
"</p>\n\t\t<!-- / Copyright -->";
|
||||
}
|
||||
else
|
||||
@@ -708,13 +685,11 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
{
|
||||
$copyright = "<!-- Copyright Information -->
|
||||
<p id='copyright'>
|
||||
Система для сообществ IP.Board{$version}
|
||||
<div style='display: none;'><a href='http://prowebber.ru' title='PROWEBBER.RU - всё для вебмастера!'>PROWEBBER.RU - всё для вебмастера!</a></div>
|
||||
";
|
||||
<a href='http://hatynka.in/' title='Nulled by Hatynka.in'>Система для сообществ IP.Board{$version}</a>";
|
||||
|
||||
if ( $this->settings['ipb_reg_show'] and $this->settings['ipb_reg_name'] )
|
||||
if ( $this->settings['ipb_reg_name'] )
|
||||
{
|
||||
$copyright .= "<br />" . $this->lang->words['licensed_to'] . $this->settings['ipb_reg_name'];
|
||||
$copyright .= "<br />" . $this->lang->words['licensed_to'] . ' ' . $this->settings['ipb_reg_name'];
|
||||
}
|
||||
|
||||
|
||||
@@ -727,7 +702,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
/**
|
||||
* Returns debug data
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return string Debug HTML
|
||||
*/
|
||||
public function html_showDebugInfo()
|
||||
@@ -915,14 +890,57 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
$stats .= "</div>\n</div>";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Memory usage
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPS_MEMORY_DEBUG_MODE AND defined( 'IPS_MEMORY_START' ) AND $this->memberData['g_access_cp'] )
|
||||
{
|
||||
if ( is_array( IPSDebug::$memory_debug ) )
|
||||
{
|
||||
$memory .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>MEMORY USAGE</div><div class='row1' style='padding:6px'>\n";
|
||||
$memory .= "<table cellpadding='4' cellspacing='0' border='0' width='100%'>\n";
|
||||
$_c = 0;
|
||||
|
||||
foreach( IPSDebug::$memory_debug as $usage )
|
||||
{
|
||||
$_col = ( $_c % 2 ) ? '#eee' : '#ddd';
|
||||
$_c++;
|
||||
|
||||
if ( $usage[1] > 500 * 1024 )
|
||||
{
|
||||
$_col .= ";color:#D00000";
|
||||
}
|
||||
else if ( $usage[1] < 10 * 1024 )
|
||||
{
|
||||
$_col .= ";color:darkgreen";
|
||||
}
|
||||
else if ( $usage[1] < 100 * 1024 )
|
||||
{
|
||||
$_col .= ";color:darkorange";
|
||||
}
|
||||
|
||||
$memory .= "<tr><td width='60%' style='background-color:{$_col}' align='left'>{$usage[0]}</td><td style='background-color:{$_col}' align='left'><strong>".IPSLib::sizeFormat( $usage[1] )."</strong></td></tr>";
|
||||
}
|
||||
|
||||
$memory .= "</table></div></div>";
|
||||
}
|
||||
|
||||
$end = memory_get_usage();
|
||||
$peak_end = function_exists('memory_get_peak_usage') ? memory_get_peak_usage() : memory_get_usage();
|
||||
$_used = $end - IPS_MEMORY_START;
|
||||
$peak_used = $peak_end - IPS_MEMORY_START;
|
||||
|
||||
$stats .= $memory;
|
||||
$stats .= "Total Memory Used: " . IPSLib::sizeFormat( $_used ) . " (Peak:" . IPSLib::sizeFormat( $peak_used ).")";
|
||||
}
|
||||
|
||||
if ( $stats )
|
||||
{
|
||||
$stats = "
|
||||
<div align='center' id='debug_wrapper'>
|
||||
<div class='row2' style='padding:8px;vertical-align:middle'><a href='#' onclick=\"$('debug').toggle(); return false;\">Скрыть</a></div>
|
||||
<br />
|
||||
<div align='center' style='width:92%; margin:120px auto 20px auto; overflow:auto;'>
|
||||
<div class='tableborder' align='left' id='debug'>
|
||||
<div class='maintitle'>Отладочная информация</div>
|
||||
<div class='maintitle'>Debug Information (<a href='#' onclick=\"$('debug').toggle(); return false;\">Hide Debug Information</a>)</div>
|
||||
<div style='padding:5px;background:#8394B2;'>{$stats}</div>
|
||||
</div>
|
||||
</div>";
|
||||
@@ -934,12 +952,12 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
/**
|
||||
* Fetch language drop down box
|
||||
*
|
||||
* @access private
|
||||
* @return string Drop down list.
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
private function html_buildLanguageDropDown()
|
||||
protected function html_buildLanguageDropDown()
|
||||
{
|
||||
$lang_list = "";
|
||||
$lang_list = array();
|
||||
$cache = $this->caches['lang_data'];
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -952,14 +970,18 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
{
|
||||
if ( $this->member->language_id == $data['lang_id'] )
|
||||
{
|
||||
$selected = ' selected="selected"';
|
||||
$lang_list['options'][] = array( 'id' => $data['lang_id'], 'title' => $data['lang_title'], 'selected' => true );
|
||||
$lang_list['default'] = $data['lang_title'];
|
||||
}
|
||||
else if( !$this->member->language_id AND $data['lang_default'] )
|
||||
{
|
||||
$lang_list['options'][] = array( 'id' => $data['lang_id'], 'title' => $data['lang_title'], 'selected' => true );
|
||||
$lang_list['default'] = $data['lang_title'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = "";
|
||||
$lang_list['options'][] = array( 'id' => $data['lang_id'], 'title' => $data['lang_title'], 'selected' => false );
|
||||
}
|
||||
|
||||
$lang_list .= "\n<option value='{$data['lang_id']}'{$selected}>{$data['lang_title']}</option>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -971,18 +993,18 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
*
|
||||
* Does what is says up there a bit
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param int Parent id
|
||||
* @param int Iteration
|
||||
* @return string Drop down list. All nicely formatted.
|
||||
* @return array
|
||||
*/
|
||||
private function html_fetchSetsDropDown( $parent=0, $iteration=0 )
|
||||
protected function html_fetchSetsDropDown( $parent=0, $iteration=0 )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$output = "";
|
||||
$output = array();
|
||||
$depthMarkers = "";
|
||||
|
||||
if( $iteration )
|
||||
@@ -1021,14 +1043,14 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
continue;
|
||||
}
|
||||
|
||||
$_selected = ( $this->skin['set_id'] == $data['set_id'] ) ? 'selected="selected"' : '';
|
||||
$_selected = ( $this->skin['set_id'] == $data['set_id'] ) ? true : false;
|
||||
|
||||
/* Ok to add... */
|
||||
$output .= "\n<option id='skinSetDD_" . $data['set_id'] . "' " . $_selected . " value=\"". $data['set_id'] . "\">". $depthMarkers . $data['set_name'] . "</option>";
|
||||
$output[] = array( 'id' => $data['set_id'], 'depth' => $depthMarkers, 'title' => $data['set_name'], 'selected' => $_selected );
|
||||
|
||||
if ( is_array( $data['_childTree'] ) AND count( $data['_childTree'] ) )
|
||||
{
|
||||
$output .= $this->html_fetchSetsDropDown( $data['set_id'], $iteration + 1 );
|
||||
$output = array_merge( $output, $this->html_fetchSetsDropDown( $data['set_id'], $iteration + 1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1038,10 +1060,10 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
/**
|
||||
* Get faster text
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
private function _getFasterText()
|
||||
protected function _getFasterText()
|
||||
{
|
||||
$texts = array(
|
||||
'Zooom',
|
||||
|
||||
Reference in new issue
Block a user