Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Ouput format: HTML
|
||||
* (Matt Mecham)
|
||||
* Last Updated: $Date: 2009-08-28 05:22:55 -0400 (Fri, 28 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-10-28 12:07:41 -0400 (Thu, 28 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 5053 $
|
||||
* @version $Revision: 7063 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -122,6 +124,29 @@ class coreOutput
|
||||
*/
|
||||
protected $_outputType = 'normal';
|
||||
|
||||
/**
|
||||
* Store canonical tag
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $_canonicalUrl;
|
||||
|
||||
/**
|
||||
* Force download flag
|
||||
*
|
||||
* @access protected
|
||||
* @var boolean
|
||||
*/
|
||||
protected $_forceDownload = false;
|
||||
|
||||
/**
|
||||
* Temporary title holder
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $_current_page_title = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* We could use 'extends' and build the registry object up but
|
||||
@@ -147,6 +172,23 @@ class coreOutput
|
||||
$this->cache = $output->cache;
|
||||
$this->caches = $output->caches;
|
||||
$this->skin = $output->skin;
|
||||
|
||||
/* Check for forceDownload */
|
||||
if ( isset( $_GET['forceDownload'] ) AND $_GET['forceDownload'] AND ( $_GET['_k'] == $this->member->form_hash ) )
|
||||
{
|
||||
$this->_forceDownload = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set forced download mode
|
||||
*
|
||||
* @access protected
|
||||
* @param boolean
|
||||
*/
|
||||
protected function forceDownload( $bool )
|
||||
{
|
||||
$this->_forceDownload = ( $bool === true ) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -179,16 +221,33 @@ class coreOutput
|
||||
case 200:
|
||||
$this->_headerStatus = 'OK';
|
||||
break;
|
||||
|
||||
case 301:
|
||||
$this->_headerStatus = 'Moved Permanently';
|
||||
break;
|
||||
|
||||
case 403:
|
||||
$this->_headerStatus = 'Forbidden';
|
||||
break;
|
||||
|
||||
case 404:
|
||||
$this->_headerStatus = 'Not Found';
|
||||
break;
|
||||
|
||||
case 500:
|
||||
$this->_headerStatus = 'Internal Server Error';
|
||||
break;
|
||||
|
||||
case 503:
|
||||
$this->_headerStatus = 'Service Unavailable';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Canonical Tag
|
||||
* @example: $output->addCanonicalTag( 'showtopic=xx', 'my-test-topic', 'showtopic' );
|
||||
* <code>$output->addCanonicalTag( 'showtopic=xx', 'my-test-topic', 'showtopic' );</code>
|
||||
*
|
||||
* @access public
|
||||
* @param string URL bit (showtopic=x)
|
||||
@@ -201,7 +260,16 @@ class coreOutput
|
||||
/* Build it */
|
||||
if ( $urlBit AND $seoTemplate )
|
||||
{
|
||||
$url = $this->registry->getClass('output')->buildSEOUrl( $urlBit, 'public', $seoTitle, $seoTemplate );
|
||||
$url = $this->registry->getClass('output')->buildSEOUrl( $urlBit, 'publicNoSession', $seoTitle, $seoTemplate );
|
||||
|
||||
/* Strip off /index$ */
|
||||
if ( substr( $url, -6 ) == '/index' )
|
||||
{
|
||||
$url = substr_replace( $url, '', -5 );
|
||||
}
|
||||
|
||||
/* Store it */
|
||||
$this->_canonicalUrl = $url;
|
||||
|
||||
if ( $url )
|
||||
{
|
||||
@@ -210,23 +278,45 @@ class coreOutput
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch Canonical Tag
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCanonicalUrl()
|
||||
{
|
||||
return ( $this->_canonicalUrl ) ? $this->_canonicalUrl : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add meta tag
|
||||
* @example: $output->addMetaTag( 'description', 'This is a short description' );
|
||||
* <code>$output->addMetaTag( 'description', 'This is a short description' );</code>
|
||||
*
|
||||
* @access public
|
||||
* @param string tag name
|
||||
* @param string tag content
|
||||
* @param boolean Encode content
|
||||
* @param int Length to trim to (default 500)
|
||||
* @return void
|
||||
* @link http://community.invisionpower.com/tracker/issue-22826-case-sensitivity-in-meta-tags/
|
||||
*/
|
||||
public function addMetaTag( $tag, $content, $encode='' )
|
||||
public function addMetaTag( $tag, $content, $encode='', $trimLen=500 )
|
||||
{
|
||||
$encode = ( $encode === FALSE ) ? FALSE : TRUE;
|
||||
$encode = ( $encode === FALSE ) ? FALSE : TRUE;
|
||||
$trimLen = ( $trimLen - 3 );
|
||||
$tag = strtolower($tag); // 'ROBOTS' should overwrite 'robots'
|
||||
|
||||
switch( $tag )
|
||||
{
|
||||
case 'description':
|
||||
$content = IPSText::truncate( strip_tags($content), 247 );
|
||||
/* Clear out 'Quote' if it's present in the bbcode parsed content */
|
||||
$content = preg_replace( '/\<p class=\'citation\'\>.+?\<\/p\>/ims', '', $content );
|
||||
|
||||
# There is no max value, but we trim so we don't bloat the output.
|
||||
# It's not just search engines that use this, also link sharing services
|
||||
# pick up the meta description.
|
||||
$content = IPSText::truncate( strip_tags($content), $trimLen );
|
||||
break;
|
||||
case 'keywords':
|
||||
if ( $encode === TRUE )
|
||||
@@ -234,7 +324,7 @@ class coreOutput
|
||||
//Bug #15323 breaks accented characters, etc
|
||||
//$content = strtolower( preg_replace( "/[^0-9a-zA-Z ]/", "", preg_replace( "/&([^;]+?);/", "", $content ) ) );
|
||||
$content = str_replace( array( '.', ',', '!', ':', ';', "'", "'", '@', '%', '*', '(', ')' ), '', preg_replace( "/&([^;]+?);/", "", $content ) );
|
||||
$_vals = preg_split( "/\s+?/", $content, -1, PREG_SPLIT_NO_EMPTY );
|
||||
$_vals = preg_split( '/\s+?/', $content, -1, PREG_SPLIT_NO_EMPTY );
|
||||
$_sw = explode( ',', $this->lang->words['_stopwords_'] );
|
||||
$_fvals = array();
|
||||
$_limit = 30;
|
||||
@@ -262,8 +352,29 @@ class coreOutput
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$this->_metaTags[ $tag ] = ( $encode === TRUE ) ? htmlspecialchars( $content ) : $content;
|
||||
|
||||
$this->_metaTags[ $tag ] = ( $encode === TRUE ) ? preg_replace( '/&#(\d+?);/', "&#\\1;", htmlspecialchars( $content ) ) : $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve meta tags
|
||||
* <code>$output->getMetaTags( 'description' );
|
||||
* $output->getMetaTags();</code>
|
||||
*
|
||||
* @access public
|
||||
* @param string tag name (optional)
|
||||
* @return mixed Array of meta tags, or meta tag specified if tag name is supplied
|
||||
*/
|
||||
public function getMetaTags( $tag='' )
|
||||
{
|
||||
if( $tag )
|
||||
{
|
||||
return isset( $this->_metaTags[ $tag ] ) ? $this->_metaTags[ $tag ] : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->_metaTags;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,8 +403,8 @@ class coreOutput
|
||||
// Set up defaults
|
||||
//-----------------------------------------
|
||||
|
||||
$this->memberData['msg_count_new'] = intval($this->memberData['msg_count_new']);
|
||||
$this->memberData['msg_count_total'] = intval($this->memberData['msg_count_total']);
|
||||
$this->memberData['msg_count_new'] = ( ! empty( $this->memberData['msg_count_new'] ) ) ? intval($this->memberData['msg_count_new']) : 0;
|
||||
$this->memberData['msg_count_total'] = ( ! empty( $this->memberData['msg_count_total'] ) ) ? intval($this->memberData['msg_count_total']) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -308,47 +419,67 @@ class coreOutput
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch applications
|
||||
* Fetch navigation tabs
|
||||
*
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
protected function core_fetchApplicationData()
|
||||
{
|
||||
foreach( ipsRegistry::$applications as $app_dir => $app_data )
|
||||
$tabs = array();
|
||||
|
||||
/* Check for cache */
|
||||
if ( ! isset( $this->caches['navigation_tabs'] ) OR ! count( $this->caches['navigation_tabs'] ) )
|
||||
{
|
||||
$_appShow = 1;
|
||||
$_appActive = 0;
|
||||
$this->registry->cache()->rebuildCache( 'navigation_tabs', 'global' );
|
||||
|
||||
if ( IPSLib::appIsInstalled( $app_dir ) !== TRUE )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $app_data['app_hide_tab'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $app_dir == 'core' OR $app_dir == 'forums' OR $app_dir == 'members' )
|
||||
{
|
||||
$_appShow = 0;
|
||||
}
|
||||
|
||||
if ( IPS_APP_COMPONENT == $app_dir )
|
||||
{
|
||||
$_appActive = 1;
|
||||
}
|
||||
|
||||
$applications[ $app_dir ] = array( 'app_dir' => $app_dir,
|
||||
'app_title' => $app_data['app_public_title'],
|
||||
'app_show' => $_appShow,
|
||||
'app_active' => $_appActive,
|
||||
'app_data' => $app_data );
|
||||
|
||||
$this->caches['navigation_tabs'] = $this->registry->cache()->getCache('navigation_tabs');
|
||||
}
|
||||
|
||||
return $applications;
|
||||
foreach( $this->caches['navigation_tabs'] as $tab )
|
||||
{
|
||||
if ( IPSLib::appIsInstalled( $tab['app'] ) !== TRUE )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$show = TRUE;
|
||||
if ( $tab['app'] == 'core' OR $tab['app'] == 'forums' OR $tab['app'] == 'members' )
|
||||
{
|
||||
$show = FALSE;
|
||||
}
|
||||
|
||||
$active = FALSE;
|
||||
if ( ipsRegistry::$current_application == $tab['app'] )
|
||||
{
|
||||
if ( $tab['module'] )
|
||||
{
|
||||
if ( ipsRegistry::$current_module == $tab['module'] )
|
||||
{
|
||||
$active = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$active = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
$link = "app={$tab['app']}";
|
||||
if ( $tab['module'] )
|
||||
{
|
||||
$link = "app={$tab['app']}&module={$tab['module']}";
|
||||
}
|
||||
|
||||
$tabs[] = array( 'app_dir' => $tab['app'],
|
||||
'app_module' => $tab['module'],
|
||||
'app_title' => $tab['title'],
|
||||
'app_show' => $show,
|
||||
'app_active' => $active,
|
||||
'app_link' => $link );
|
||||
|
||||
}
|
||||
return $tabs;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -383,7 +514,7 @@ class coreOutput
|
||||
}
|
||||
else if( $type == 'import' )
|
||||
{
|
||||
if( ! $this->_css['import'][$data] )
|
||||
if( !isset($this->_css['import'][$data]) )
|
||||
{
|
||||
$this->_css['import'][$data] = array(
|
||||
'content' => $data,
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Ouput format: HTML
|
||||
* (Matt Mecham)
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* (c) IPS, Inc.
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
* Configuration file for output formats
|
||||
* FORMAT: HTML
|
||||
*/
|
||||
|
||||
$config = array();
|
||||
|
||||
/* Identifies publicly as... */
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Ouput format: HTML
|
||||
* (Matt Mecham)
|
||||
* Last Updated: $Date: 2009-12-04 03:16:10 -0500 (Fri, 04 Dec 2009) $
|
||||
* Last Updated: $Date: 2010-10-13 09:23:30 -0400 (Wed, 13 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 5518 $
|
||||
* @version $Revision: 6966 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -27,6 +29,14 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
*/
|
||||
protected $output;
|
||||
|
||||
/**
|
||||
* Print only flag
|
||||
*
|
||||
* @access protected
|
||||
* @var bool
|
||||
*/
|
||||
protected $_printOnly = false;
|
||||
|
||||
/**
|
||||
* CSS array
|
||||
*
|
||||
@@ -46,6 +56,12 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
{
|
||||
/* Make object */
|
||||
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 ) )
|
||||
{
|
||||
$this->_printOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,20 +109,29 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
header("HTTP/1.1 " . $this->_headerCode . ' ' . $this->_headerStatus );
|
||||
}
|
||||
|
||||
header( "Content-type: text/html;charset=" . IPS_DOC_CHAR_SET );
|
||||
/* Forcing a download? */
|
||||
if ( $this->_forceDownload )
|
||||
{
|
||||
header( "Content-type: unknown/unknown" );
|
||||
header( "Content-Disposition: attachment; filename=\"" . IPSText::alphanumericalClean( IPSText::transliterate( mb_strtolower( $this->registry->output->getTitle() ) ) ) . ".html\"" );
|
||||
}
|
||||
else
|
||||
{
|
||||
header( "Content-type: text/html;charset=" . IPS_DOC_CHAR_SET );
|
||||
}
|
||||
|
||||
if ( $this->settings['nocache'] )
|
||||
{
|
||||
$expires = ( $this->_headerExpire ) ? gmdate("D, d M Y H:i:s", time() + $this->_headerExpire ) . " GMT" : 0;
|
||||
$maxAge = $this->_headerExpire;
|
||||
$nocache = ( ! $this->_headerExpire ) ? ',no-cache' : '';
|
||||
$expires = ( $this->_headerExpire ) ? gmdate( "D, d M Y H:i:s", time() + $this->_headerExpire ) . " GMT" : gmdate( "D, d M Y H:i:s", time() - 86400 ) . " GMT";
|
||||
$maxAge = $this->_headerExpire;
|
||||
$nocache = ( ! $this->_headerExpire ) ? 'no-cache,' : '';
|
||||
|
||||
header("Cache-Control: ". $nocache . "must-revalidate, max-age=" . $maxAge);
|
||||
header("Expires: " . $expires);
|
||||
header( "Cache-Control: ". $nocache . "must-revalidate, max-age=" . $maxAge );
|
||||
header( "Expires: " . $expires );
|
||||
|
||||
if ( ! $this->_headerExpire )
|
||||
{
|
||||
header("Pragma: no-cache");
|
||||
header( "Pragma: no-cache" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -235,27 +260,29 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
if ( $this->_outputType == 'normal' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Do we have a PM show?
|
||||
// Do we have a notification show?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ( $this->memberData['msg_count_reset'] OR $this->memberData['msg_show_notification'] ) AND ! $this->memberData['members_disable_pm'] )
|
||||
$notifications = null;
|
||||
|
||||
if ( ! empty( $this->memberData['msg_show_notification'] ) AND $this->memberData['_cache']['show_notification_popup'] )
|
||||
{
|
||||
if ( ( $this->request['module'] != 'messaging' ) AND ( ! $this->settings['board_offline'] OR $this->memberData['g_access_offline']) )
|
||||
if ( !$this->settings['board_offline'] OR $this->memberData['g_access_offline'] )
|
||||
{
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'msg_show_notification' => 0 ) ) );
|
||||
|
||||
/* Grab PM Data. We init if we need to recount... */
|
||||
require_once( IPSLib::getAppDir( "members" ) . '/sources/classes/messaging/messengerFunctions.php' );
|
||||
$messengerFunctions = new messengerFunctions( $this->registry );
|
||||
|
||||
/* Only collect data if we have notifications to show */
|
||||
if ( $this->memberData['msg_show_notification'] )
|
||||
if( strpos( ipsRegistry::$settings['query_string_real'], 'area=notificationlog' ) === false )
|
||||
{
|
||||
$_data = $messengerFunctions->fetchUnreadNotifications( $this->memberData['member_id'] );
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'msg_show_notification' => 0 ) ) );
|
||||
|
||||
/* Grab inline notifications... */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
|
||||
$notifyLibrary = new $classToLoad( $this->registry );
|
||||
$notifyLibrary->setMember( $this->memberData );
|
||||
|
||||
$_data = $notifyLibrary->fetchUnreadNotifications( 1, 'notify_sent', 'DESC', true, true );
|
||||
|
||||
if ( count( $_data ) )
|
||||
{
|
||||
$pmData = array_shift( $_data );
|
||||
$notifications = array_shift( $_data );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,6 +293,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
//-----------------------------------------
|
||||
|
||||
$http = 'http://';
|
||||
|
||||
if ( strpos( $this->settings['board_url'], 'https://' ) === 0 )
|
||||
{
|
||||
$http = 'https://';
|
||||
@@ -291,20 +319,22 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
//-----------------------------------------
|
||||
|
||||
$finalOutput = $this->output->getTemplate('global')->globalTemplate( $output, $documentHeadItems, $this->_css, $jsLoaderItems, $this->_metaTags,
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
'page' => $this->_current_page_title ),
|
||||
array( 'navigation' => $navigation,
|
||||
'pmData' => $pmData ),
|
||||
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' => 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 )
|
||||
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 )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -335,6 +365,15 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
$finalOutput = $this->output->getTemplate('global_other')->displayPopUpWindow( $documentHeadItems, $this->_css, $jsLoaderItems, $title, $output );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set a class on the body for print
|
||||
//-----------------------------------------
|
||||
|
||||
if( $this->_printOnly )
|
||||
{
|
||||
$finalOutput = str_replace( "<body", "<body class='printpreview'", $finalOutput );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return
|
||||
//-----------------------------------------
|
||||
@@ -412,6 +451,19 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
|
||||
foreach( $this->registry->getClass('output')->skin['_cssGroupsArray'] as $position => $data )
|
||||
{
|
||||
/* Print only */
|
||||
if ( $this->_printOnly === true )
|
||||
{
|
||||
if ( $data['css_group'] != 'ipb_print' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['attributes'] = 'media="screen"';
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['content'] = str_replace( 'http://', 'https://', $this->registry->getClass('output')->skin['_css'][ $data['css_group'] ]['content'] );
|
||||
}
|
||||
}
|
||||
@@ -424,19 +476,32 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
{
|
||||
$name = $data['css_group'];
|
||||
|
||||
/* Print only */
|
||||
if ( $this->_printOnly === true )
|
||||
{
|
||||
if ( $name != 'ipb_print' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('output')->skin['_css'][ $name ]['attributes'] = 'media="screen"';
|
||||
}
|
||||
}
|
||||
|
||||
/* Did we skip it? */
|
||||
if ( ! isset( $this->registry->getClass('output')->skin['_css'][ $name ] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Skip IE, print and lo-fi as it's hardcoded in the skin */
|
||||
/* Skip IE, print and lo-fi as it's hardcoded in the skin */
|
||||
if ( $name == 'ipb_ie' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $this->registry->getClass('output')->skin['set_css_inline'] AND @file_exists( IPS_CACHE_PATH . PUBLIC_DIRECTORY . '/style_css/'. $this->registry->getClass('output')->skin['_csscacheid'] .'/'. $name . '.css' ) )
|
||||
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' ) )
|
||||
{
|
||||
$_cssFile = $this->settings['public_dir'] . 'style_css/' . $this->registry->getClass('output')->skin['_csscacheid'] .'/'. $name . '.css';
|
||||
$this->_css['import'][$_cssFile] = array(
|
||||
@@ -529,7 +594,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
/* Strip session URL if there wasn't one */
|
||||
if ( ! IN_ACP AND $this->member->session_type != 'cookie' AND ! $this->request['s'] )
|
||||
{
|
||||
$url = preg_replace( "/\?s=([a-zA-Z0-9]{32})(&|&|$)/", '', $url );
|
||||
$url = preg_replace( '/\?s=([a-zA-Z0-9]{32})(&|&|$)/', '', $url );
|
||||
}
|
||||
|
||||
/* Log it */
|
||||
@@ -591,9 +656,17 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
|
||||
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/style_(images|avatars|emoticons)(.+?)["\'](.+?)?' . '>#is', "img src=\"".$this->settings['ipb_img_url']."public/style_\\1\\2\"\\3>", $text );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up dates
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strstr( $text, '{timestamp:' ) )
|
||||
{
|
||||
$text = preg_replace_callback( '#<!--\{timestamp:(\d+?):([^\}]+?)\}-->#', create_function( '$key', 'return ipsRegistry::getClass(\'class_localization\')->getDate($key[1], \'$key[2]\', 1);' ), $text );
|
||||
}
|
||||
|
||||
|
||||
return $text;
|
||||
}
|
||||
@@ -612,22 +685,36 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
// CRIMINAL CHARGES
|
||||
//-----------------------------------------
|
||||
|
||||
$version = ( $this->settings['ipb_display_version'] AND $this->settings['ipb_display_version'] != 0 ) ? IPB_VERSION : '';
|
||||
$version = ( $this->settings['ipb_display_version'] AND $this->settings['ipb_display_version'] != 0 ) ? ' ' . IPB_VERSION : '';
|
||||
|
||||
if ($this->settings['ipb_copy_number'] && $this->settings['ips_cp_purchase'])
|
||||
{
|
||||
$copyright = "";
|
||||
/**
|
||||
* @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'] )
|
||||
{
|
||||
$copyright = "<!-- Copyright Information -->
|
||||
<p id='copyright'>" .
|
||||
$this->lang->words['licensed_to'] . $this->settings['ipb_reg_name'] .
|
||||
"</p>\n\t\t<!-- / Copyright -->";
|
||||
}
|
||||
else
|
||||
{
|
||||
$copyright = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$copyright = "<!-- Copyright Information -->
|
||||
<p id='copyright' class='right'>
|
||||
Форум IP.Board {$version} © ".date("Y")." IPS, In<abbr title='Incorporated'>c</abbr>.
|
||||
<p id='copyright'>
|
||||
Система для сообществ IP.Board{$version}
|
||||
<div style='display: none;'><a href='http://prowebber.ru' title='PROWEBBER.RU - всё для вебмастера!'>PROWEBBER.RU - всё для вебмастера!</a></div>
|
||||
";
|
||||
|
||||
if ( $this->settings['ipb_reg_show'] and $this->settings['ipb_reg_name'] )
|
||||
{
|
||||
$copyright .= "<br />Зарегистрирован на: ". $this->settings['ipb_reg_name'];
|
||||
$copyright .= "<br />" . $this->lang->words['licensed_to'] . $this->settings['ipb_reg_name'];
|
||||
}
|
||||
|
||||
|
||||
@@ -769,7 +856,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
|
||||
$cache['task_next_run'] = $cache['task_next_run'] ? $cache['task_next_run'] : 0;
|
||||
|
||||
$stats .= "<b>Следующая задача</b> = ".$this->registry->getClass( 'class_localization')->getDate( $cache['task_next_run'], 'LONG' )."\n<br /><b>Time now</b> = ".$this->registry->getClass( 'class_localization')->getDate( time(), 'LONG' );
|
||||
$stats .= "<b>Следующая задача</b> = ".$this->registry->getClass( 'class_localization')->getDate( $cache['task_next_run'], 'LONG' )."\n<br /><b>Время</b> = ".$this->registry->getClass( 'class_localization')->getDate( time(), 'LONG' );
|
||||
$stats .= "<br /><b>Сейчас</b> = ".time();
|
||||
|
||||
$stats .= "<p>Пользователь: last_visit: " . $this->memberData['last_visit'] . " / " . $this->registry->getClass( 'class_localization')->getDate( $this->memberData['last_visit'], 'LONG' ) . "</p>";
|
||||
@@ -831,7 +918,7 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
if ( $stats )
|
||||
{
|
||||
$stats = "
|
||||
<div align='center'>
|
||||
<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 class='tableborder' align='left' id='debug'>
|
||||
@@ -947,4 +1034,33 @@ class htmlOutput extends coreOutput implements interface_output
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get faster text
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
private function _getFasterText()
|
||||
{
|
||||
$texts = array(
|
||||
'Zooom',
|
||||
'REALLY fast',
|
||||
'Quick',
|
||||
'Lightning',
|
||||
'Chop chop',
|
||||
'Expeditive',
|
||||
'Flash',
|
||||
'Lickety Split',
|
||||
'On the double',
|
||||
'Rapid',
|
||||
'Velocious',
|
||||
'Pronto',
|
||||
'Speedy Gonzales',
|
||||
'Warp Speed',
|
||||
'Double espresso',
|
||||
);
|
||||
|
||||
return $texts[ array_rand($texts) ];
|
||||
}
|
||||
}
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,13 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Ouput format: XML
|
||||
* (Matt Mecham)
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* (c) IPS, Inc.
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
* Configuration file for output formats
|
||||
* FORMAT: XML
|
||||
*/
|
||||
|
||||
$config = array();
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Ouput format: HTML
|
||||
* (Matt Mecham)
|
||||
* Last Updated: $Date: 2009-02-16 13:44:12 -0500 (Mon, 16 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-09-15 17:14:23 -0400 (Wed, 15 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @author $Author: terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 3998 $
|
||||
* @version $Revision: 6881 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -74,8 +76,15 @@ class xmlOutput extends coreOutput implements interface_output
|
||||
print $buffer;
|
||||
}
|
||||
|
||||
header("HTTP/1.0 200 OK");
|
||||
header("HTTP/1.1 200 OK");
|
||||
if ( isset( $_SERVER['SERVER_PROTOCOL'] ) AND strstr( $_SERVER['SERVER_PROTOCOL'], '/1.0' ) )
|
||||
{
|
||||
header("HTTP/1.0 200 OK" );
|
||||
}
|
||||
else
|
||||
{
|
||||
header("HTTP/1.1 200 OK" );
|
||||
}
|
||||
|
||||
header( "Content-type: text/xml;charset=" . IPS_DOC_CHAR_SET );
|
||||
|
||||
if ( $this->settings['nocache'] )
|
||||
@@ -143,12 +152,10 @@ class xmlOutput extends coreOutput implements interface_output
|
||||
//-----------------------------------------
|
||||
|
||||
$finalOutput = $this->output->getTemplate('global')->globalTemplate( $output, $documentHeadItems, $this->_css, $jsLoaderItems,
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
'page' => $this->_current_page_title ),
|
||||
array( 'navigation' => $navigation,
|
||||
'pmData' => $pmData,
|
||||
'showReportBox' => ($memberCache['report_last_updated'] < $reportsCache['last_updated'] && $memberCache['report_num'] > 0) ? 1 : 0 ),
|
||||
array( 'title' => $title,
|
||||
'applications' => $this->core_fetchApplicationData(),
|
||||
'page' => $this->_current_page_title ),
|
||||
array( 'navigation' => $navigation ),
|
||||
array( 'time' => $this->registry->getClass( 'class_localization')->getDate( time(), 'SHORT', 1 ),
|
||||
'lang_chooser' => $this->html_buildLanguageDropDown(),
|
||||
'skin_chooser' => $this->html_fetchSetsDropDown(),
|
||||
@@ -298,7 +305,9 @@ class xmlOutput extends coreOutput implements interface_output
|
||||
{
|
||||
$copyright = "<!-- Copyright Information -->
|
||||
<p id='copyright'>
|
||||
Форум IP.Board {$version} © ".date("Y")." IPS, In<abbr title='Incorporated'>c</abbr>.
|
||||
Форум IP.Board
|
||||
{$version} © ".date("Y")." IPS, <abbr title='Incorporated'>Inc</abbr>.
|
||||
<div style='display: none;'><a href='http://prowebber.ru' title='PROWEBBER.RU - всё для вебмастера!'>PROWEBBER.RU - всё для вебмастера!</a></div>
|
||||
";
|
||||
|
||||
if ( $this->settings['ipb_reg_show'] and $this->settings['ipb_reg_name'] )
|
||||
|
||||
Reference in new issue
Block a user