Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -2,22 +2,14 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:55 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 22 $
|
||||
@@ -44,7 +36,7 @@
|
||||
*/
|
||||
|
||||
define( 'IPS_TEMPLATE_DEBUG' , 0 );
|
||||
define( 'IPS_TEMPLATE_DEBUG_FILE', dirname( _FILE_ ) . '/../cache/template_debug.cgi' );
|
||||
define( 'IPS_TEMPLATE_DEBUG_FILE', dirname( __FILE__ ) . '/../cache/template_debug.cgi' );
|
||||
|
||||
/**
|
||||
* Template Engine (NOT USED CURRENTLY: FOR IPB 3.0, IP.Dynamic)
|
||||
@@ -113,7 +105,81 @@ class class_template
|
||||
*
|
||||
* @param $data string The actual contents of the class, php tags 'an all.
|
||||
*/
|
||||
function convert_cache_to_eval($data='', $full_class_name='')
|
||||
function convert_cache_to_eval($data='', $full_class_name='', $id=1)
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$final_content = $this->_return_function_data( $data );
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab "linked" template bits
|
||||
//-----------------------------------------
|
||||
|
||||
/*
|
||||
<__templatebits__>
|
||||
<bit>skin_global:personal_portal_gender_image</bit>
|
||||
<bit>skin_global:personal_portal_online_image</bit>
|
||||
</__templatebits__>
|
||||
*/
|
||||
|
||||
if ( strstr( $data, '<__templatebits__>' ) )
|
||||
{
|
||||
$_templates = array();
|
||||
|
||||
preg_match( "#<__templatebits__>(.+?)</__templatebits__>#is", $data, $match );
|
||||
|
||||
if ( $match[1] )
|
||||
{
|
||||
preg_match_all( "#<bit>(.+?)</bit>#is", $data, $matches );
|
||||
|
||||
for ( $i = 0; $i < count( $matches[0] ); $i++)
|
||||
{
|
||||
list( $file, $name ) = explode( ':', $matches[1][$i] );
|
||||
|
||||
if ( $file AND $name )
|
||||
{
|
||||
$_templates[ $file ][] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got stuff to load?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $_templates ) AND count( $_templates ) )
|
||||
{
|
||||
foreach( $_templates as $file => $idx )
|
||||
{
|
||||
$_data = implode( '', file( CACHE_PATH."cache/skin_cache/cacheid_".$id."/".$file.".php" ) );
|
||||
|
||||
$final_content .= $this->_return_function_data( $_data, $_templates[ $file ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return the stuff...
|
||||
//-----------------------------------------
|
||||
|
||||
$out = "class {$full_class_name} {\n\n";
|
||||
$out .= "\t".'var $ipsclass;'."\n";
|
||||
$out .= $final_content;
|
||||
$out .= "\n\n}";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* _return_function_data
|
||||
*
|
||||
* Extracts function data
|
||||
*
|
||||
* @param $data string The actual contents of the class, php tags 'an all.
|
||||
*/
|
||||
function _return_function_data( $data='', $function_find=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -192,6 +258,14 @@ class class_template
|
||||
|
||||
foreach( $functions as $fname => $ftext )
|
||||
{
|
||||
if ( is_array( $function_find ) AND count( $function_find ) )
|
||||
{
|
||||
if ( ! in_array( $fname, $function_find ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
preg_match( "/".'\$'."IPBHTML\s+?\.?=\s+?<<<EOF(.+?)EOF;\s?/si", $ftext, $matches );
|
||||
|
||||
$func_data = trim( $config[$fname] );
|
||||
@@ -199,15 +273,10 @@ class class_template
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return the stuff...
|
||||
// Return...
|
||||
//-----------------------------------------
|
||||
|
||||
$out = "class {$full_class_name} {\n\n";
|
||||
$out .= "\t".'var $ipsclass;'."\n";
|
||||
$out .= $final_content;
|
||||
$out .= "\n\n}";
|
||||
|
||||
return $out;
|
||||
return $final_content;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -433,11 +502,15 @@ class class_template
|
||||
foreach( $_tmp_func_data as $_i )
|
||||
{
|
||||
preg_match( "#".'\$'."(\w+)(=|,|$)#i", $_i, $match );
|
||||
$_final[] = '$'.$match[1];
|
||||
|
||||
if( count($match) )
|
||||
{
|
||||
$_final[] = '$'.$match[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$clean_func_data = implode( ",", $_final );
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
// Keep the server busy for a while
|
||||
//----------------------------------------
|
||||
@@ -602,7 +675,7 @@ class class_template
|
||||
if ( strstr( strtolower($statement), 'as' ) )
|
||||
{
|
||||
# Get the last part of the argument
|
||||
list( $_trash, $keep ) = explode( 'as', $statement );
|
||||
list( $_trash, $keep ) = explode( ' as', $statement );
|
||||
$keep = trim($keep);
|
||||
|
||||
if ( strstr( $keep, '=>' ) )
|
||||
@@ -646,7 +719,7 @@ class class_template
|
||||
// Create PHP statement
|
||||
//----------------------------------------
|
||||
|
||||
$function_name = '__foreach_loop__'. uniqid( 'id_' );
|
||||
$function_name = '__foreach_loop__'. str_replace( '.', '', uniqid( 'id_', TRUE ) );
|
||||
$php_statement = '<xxforeach_'.$function_name.'xx>$this->'.$function_name.'('.$clean_func_data.')</xxforeach_'.$function_name.'xx>';
|
||||
$php_block = $this->_process_raw_html_logic( addslashes($block) );
|
||||
$php_tags = $this->_process_raw_php_tags( $block );
|
||||
|
||||
Reference in new issue
Block a user