Version 2.3.6

This commit is contained in:
Neo committed 2025-12-19 00:26:08 -08:00
1 parent a3bb603c96
commit 19b38c7c74
764 files changed
+143731 -118164

No files matched your search

+5 -15
View File
@@ -2,26 +2,16 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -46,13 +36,13 @@ $PORTAL_CONFIG = array();
* Main plug in title
*
*/
$PORTAL_CONFIG['pc_title'] = 'Êàëåíäàðü ôîðóìà';
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Calendar';
/**
* Plug in mini description
*
*/
$PORTAL_CONFIG['pc_desc'] = "Âûâîä ìèíè-êàëåíäàðÿ íà òåêóùèé ìåñÿö";
$PORTAL_CONFIG['pc_desc'] = "Displays a mini calendar for the current month";
/**
* Keyword for settings. This is the keyword
@@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = "";
*
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
*/
$PORTAL_CONFIG['pc_exportable_tags']['calendar_show_current_month'] = array( 'calendar_show_current_month', 'Âûâåñòè áëîê ñ êàëåíäàðåì íà òåêóùèé ìåñÿö' );
$PORTAL_CONFIG['pc_exportable_tags']['calendar_show_current_month'] = array( 'calendar_show_current_month', 'Shows a calendar for the current month' );
//$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' );
//$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' );
+237 -233
View File
@@ -1,234 +1,238 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > PORTAL PLUG IN MODULE: CALENDAR
| > Module written by Matt Mecham
| > Date started: Tuesday 2nd August 2005 (15:52)
+--------------------------------------------------------------------------
*/
/**
* Portal Plug In Module
*
* Portal Calendar functions
*
* @package InvisionPowerBoard
* @subpackage PortalPlugIn
* @author Matt Mecham
* @copyright Invision Power Services, Inc.
* @version 2.1
*/
/**
* Portal Plug In Module
*
* Portal Blog functions
* Each class name MUST be in the format of:
* ppi_{file_name_minus_dot_php}
*
* @package InvisionPowerBoard
* @subpackage PortalPlugIn
* @author Matt Mecham
* @copyright Invision Power Services, Inc.
* @version 2.1
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ppi_calendar
{
/**
* IPS Global object
*
* @var string
*/
var $ipsclass;
/**
* Array of portal objects including:
* good_forum, bad_forum
*
* @var array
*/
var $portal_object = array();
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
/**
* This function must be available always
* Add any set up here, such as loading language and skins, etc
*
*/
function init()
{
}
/*-------------------------------------------------------------------------*/
// MAIN FUNCTION
/*-------------------------------------------------------------------------*/
/**
* Main function
*
* @return VOID
*/
function calendar_show_current_month()
{
//-----------------------------------------
// INIT
//-----------------------------------------
//-----------------------------------------
// Grab calendar class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/action_public/calendar.php' );
$calendar = new calendar();
$calendar->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Load lang and templs
//-----------------------------------------
$this->ipsclass->load_language('lang_calendar');
$this->ipsclass->load_template('skin_calendar');
//-----------------------------------------
// DO some set up
//-----------------------------------------
$calendar->calendar_id = 1; // CHANGE TO DEFAULT?
if( ! count( $this->ipsclass->cache['calendars'] ) )
{
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) );
$this->ipsclass->DB->exec_query();
while( $cal = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['calendars'][ $cal['cal_id'] ] = $cal;
}
}
if ( count( $this->ipsclass->cache['calendars'] ) AND is_array( $this->ipsclass->cache['calendars'] ) )
{
foreach( $this->ipsclass->cache['calendars'] as $cal_id => $cal )
{
$selected = "";
$perms = unserialize( $cal['cal_permissions'] );
//-----------------------------------------
// Got a perm?
//-----------------------------------------
if ( $this->ipsclass->check_perms( $perms['perm_read'] ) != TRUE )
{
continue;
}
if ( $cal['cal_id'] == $this->calendar_id )
{
$calendar->calendar = array_merge( $cal, $perms);
$selected = " selected='selected'";
}
$calendar->calendar_cache[ $cal['cal_id'] ] = array_merge( $cal, $perms);
}
}
if( ! $calendar->calendar )
{
if( count( $calendar->calendar_cache ) )
{
$tmp_resort = $calendar->calendar_cache;
ksort($tmp_resort);
reset($tmp_resort);
$default_calid = key( $tmp_resort );
$calendar->calendar_id = $default_calid;
$calendar->calendar = $tmp_resort[ $default_calid ];
unset( $tmp_resort );
}
}
$calendar->calendar = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'cal_calendars',
'where' => 'cal_id='.$calendar->calendar_id ) );
$calendar->calendar = array_merge( unserialize( $calendar->calendar['cal_permissions'] ), $calendar->calendar );
if ( $this->ipsclass->check_perms($calendar->calendar['perm_read']) != TRUE )
{
return '';
}
//-----------------------------------------
// Finally, build up the lang arrays
//-----------------------------------------
$calendar->month_words = array( $this->ipsclass->lang['M_1'] , $this->ipsclass->lang['M_2'] , $this->ipsclass->lang['M_3'] ,
$this->ipsclass->lang['M_4'] , $this->ipsclass->lang['M_5'] , $this->ipsclass->lang['M_6'] ,
$this->ipsclass->lang['M_7'] , $this->ipsclass->lang['M_8'] , $this->ipsclass->lang['M_9'] ,
$this->ipsclass->lang['M_10'], $this->ipsclass->lang['M_11'], $this->ipsclass->lang['M_12'] );
$calendar->day_words = array( $this->ipsclass->lang['D_0'], $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'],
$this->ipsclass->lang['D_3'], $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'],
$this->ipsclass->lang['D_6'] );
//-----------------------------------------
// What now?
//-----------------------------------------
$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );
$now_date = array(
'year' => $a[0],
'mon' => $a[1],
'mday' => $a[2],
'hours' => $a[3],
'minutes' => $a[4],
'seconds' => $a[5]
);
$content = $calendar->get_mini_calendar( $now_date['mon'], $now_date['year'] );
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_calendar_wrap( $content );
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2007-06-29 15:38:25 -0400 (Fri, 29 Jun 2007) $
| > $Revision: 1078 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > PORTAL PLUG IN MODULE: CALENDAR
| > Module written by Matt Mecham
| > Date started: Tuesday 2nd August 2005 (15:52)
+--------------------------------------------------------------------------
*/
/**
* Portal Plug In Module
*
* Portal Calendar functions
*
* @package InvisionPowerBoard
* @subpackage PortalPlugIn
* @author Matt Mecham
* @copyright Invision Power Services, Inc.
* @version 2.1
*/
/**
* Portal Plug In Module
*
* Portal Blog functions
* Each class name MUST be in the format of:
* ppi_{file_name_minus_dot_php}
*
* @package InvisionPowerBoard
* @subpackage PortalPlugIn
* @author Matt Mecham
* @copyright Invision Power Services, Inc.
* @version 2.1
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ppi_calendar
{
/**
* IPS Global object
*
* @var string
*/
var $ipsclass;
/**
* Array of portal objects including:
* good_forum, bad_forum
*
* @var array
*/
var $portal_object = array();
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
/**
* This function must be available always
* Add any set up here, such as loading language and skins, etc
*
*/
function init()
{
}
/*-------------------------------------------------------------------------*/
// MAIN FUNCTION
/*-------------------------------------------------------------------------*/
/**
* Main function
*
* @return VOID
*/
function calendar_show_current_month()
{
//-----------------------------------------
// INIT
//-----------------------------------------
//-----------------------------------------
// Grab calendar class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/action_public/calendar.php' );
$calendar = new calendar();
$calendar->ipsclass =& $this->ipsclass;
//-----------------------------------------
// Load lang and templs
//-----------------------------------------
$this->ipsclass->load_language('lang_calendar');
$this->ipsclass->load_template('skin_calendar');
//-----------------------------------------
// DO some set up
//-----------------------------------------
$calendar->calendar_id = 1; // CHANGE TO DEFAULT?
if( ! count( $this->ipsclass->cache['calendars'] ) )
{
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) );
$this->ipsclass->DB->exec_query();
while( $cal = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['calendars'][ $cal['cal_id'] ] = $cal;
}
}
if ( count( $this->ipsclass->cache['calendars'] ) AND is_array( $this->ipsclass->cache['calendars'] ) )
{
foreach( $this->ipsclass->cache['calendars'] as $cal_id => $cal )
{
$selected = "";
$perms = unserialize( $cal['cal_permissions'] );
//-----------------------------------------
// Got a perm?
//-----------------------------------------
if ( $this->ipsclass->check_perms( $perms['perm_read'] ) != TRUE )
{
continue;
}
if ( $cal['cal_id'] == $this->calendar_id )
{
$calendar->calendar = array_merge( $cal, $perms);
$selected = " selected='selected'";
}
$calendar->calendar_cache[ $cal['cal_id'] ] = array_merge( $cal, $perms);
}
}
if( ! $calendar->calendar )
{
if( count( $calendar->calendar_cache ) )
{
$tmp_resort = $calendar->calendar_cache;
ksort($tmp_resort);
reset($tmp_resort);
$default_calid = key( $tmp_resort );
$calendar->calendar_id = $default_calid;
$calendar->calendar = $tmp_resort[ $default_calid ];
unset( $tmp_resort );
}
}
if( !is_array($calendar->calendar) OR !count($calendar->calendar) )
{
return'';
}
$calendar->calendar = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'cal_calendars',
'where' => 'cal_id='.$calendar->calendar_id ) );
$calendar->calendar = array_merge( unserialize( $calendar->calendar['cal_permissions'] ), $calendar->calendar );
if ( $this->ipsclass->check_perms($calendar->calendar['perm_read']) != TRUE )
{
return '';
}
//-----------------------------------------
// Finally, build up the lang arrays
//-----------------------------------------
$calendar->month_words = array( $this->ipsclass->lang['M_1'] , $this->ipsclass->lang['M_2'] , $this->ipsclass->lang['M_3'] ,
$this->ipsclass->lang['M_4'] , $this->ipsclass->lang['M_5'] , $this->ipsclass->lang['M_6'] ,
$this->ipsclass->lang['M_7'] , $this->ipsclass->lang['M_8'] , $this->ipsclass->lang['M_9'] ,
$this->ipsclass->lang['M_10'], $this->ipsclass->lang['M_11'], $this->ipsclass->lang['M_12'] );
if( !$this->ipsclass->vars['ipb_calendar_mon'] )
{
$calendar->day_words = array( $this->ipsclass->lang['D_0'], $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'],
$this->ipsclass->lang['D_3'], $this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'],
$this->ipsclass->lang['D_6'] );
}
else
{
$calendar->day_words = array( $this->ipsclass->lang['D_1'], $this->ipsclass->lang['D_2'], $this->ipsclass->lang['D_3'],
$this->ipsclass->lang['D_4'], $this->ipsclass->lang['D_5'], $this->ipsclass->lang['D_6'],
$this->ipsclass->lang['D_0'] );
}
//-----------------------------------------
// What now?
//-----------------------------------------
$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );
$now_date = array(
'year' => $a[0],
'mon' => $a[1],
'mday' => $a[2],
'hours' => $a[3],
'minutes' => $a[4],
'seconds' => $a[5]
);
$content = $calendar->get_mini_calendar( $now_date['mon'], $now_date['year'] );
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_calendar_wrap( $content );
}
}
?>
+1 -10
View File
@@ -1,10 +1 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
</head><body>
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó &laquo;<b>Íàçàä</b>&raquo; â&nbsp;âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
</body>
</html>
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>
@@ -2,26 +2,16 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -46,13 +36,13 @@ $PORTAL_CONFIG = array();
* Main plug in title
*
*/
$PORTAL_CONFIG['pc_title'] = 'Ïîëüçîâàòåëè â îí-ëàéí';
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Online Users';
/**
* Plug in mini description
*
*/
$PORTAL_CONFIG['pc_desc'] = "Âûâîä ÷èñëà ïîëüçîâàòåëåé è èõ èìåí, íàõîäÿùèõñÿ â îí-ëàéí";
$PORTAL_CONFIG['pc_desc'] = "Shows the current name and number of online users";
/**
* Keyword for settings. This is the keyword
@@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = "";
*
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
*/
$PORTAL_CONFIG['pc_exportable_tags']['online_users_show'] = array( 'online_users_show', 'Âûâåñòè áëîê ïîëüçîâàòåëåé â îí-ëàéí' );
$PORTAL_CONFIG['pc_exportable_tags']['online_users_show'] = array( 'online_users_show', 'Shows the online users' );
?>
+3 -13
View File
@@ -2,26 +2,16 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -60,7 +50,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
+5 -15
View File
@@ -2,26 +2,16 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -46,13 +36,13 @@ $PORTAL_CONFIG = array();
* Main plug in title
*
*/
$PORTAL_CONFIG['pc_title'] = 'Îïðîñ ñ ôîðóìà';
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Poll';
/**
* Plug in mini description
*
*/
$PORTAL_CONFIG['pc_desc'] = "Âûâîäèò âûáðàííûé ñ ôîðóìà îïðîñ íà ïîðòàëå";
$PORTAL_CONFIG['pc_desc'] = "Shows the selected poll";
/**
* Keyword for settings. This is the keyword
@@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = "portal_poll";
*
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
*/
$PORTAL_CONFIG['pc_exportable_tags']['poll_show_poll'] = array( 'poll_show_poll', 'Âûâåñòè áëîê ñ îïðîñîì' );
$PORTAL_CONFIG['pc_exportable_tags']['poll_show_poll'] = array( 'poll_show_poll', 'Shows the request poll' );
?>
+3 -13
View File
@@ -2,26 +2,16 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -60,7 +50,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
@@ -2,26 +2,16 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -46,13 +36,13 @@ $PORTAL_CONFIG = array();
* Main plug in title
*
*/
$PORTAL_CONFIG['pc_title'] = 'Ïîñëåäíèå òåìû ñ ôîðóìà';
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board Recent Topics';
/**
* Plug in mini description
*
*/
$PORTAL_CONFIG['pc_desc'] = "Âûâîäèò ïîñëåäíèå òåìû ñ ïåðâûì ñîîáùåíèåì èç íèõ";
$PORTAL_CONFIG['pc_desc'] = "Shows IPB recent topics with topic's first post";
/**
* Keyword for settings. This is the keyword
@@ -81,7 +71,7 @@ $PORTAL_CONFIG['pc_settings_keyword'] = "portal_recent_topics";
*
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
*/
$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_last_x'] = array( 'recent_topics_last_x' , 'Âûâåñòè áëîê ñ ïîñëåäíèìè òåìàìè èç îïðåäåëåííûõ ôîðóìîâ' );
$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_discussions_last_x'] = array( 'recent_topics_discussions_last_x', 'Âûâåñòè áëîê ñ ïîñëåäíèìè òåìàìè èç âñåõ ôîðóìîâ' );
$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_last_x'] = array( 'recent_topics_last_x' , 'Shows the last X topics with full post from the selected forums' );
$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_discussions_last_x'] = array( 'recent_topics_discussions_last_x', 'Shows the last X topic titles from ALL viewable forums' );
?>
+52 -28
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
| > $Date: 2008-04-23 15:02:02 -0400 (Wed, 23 Apr 2008) $
| > $Revision: 1254 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > PORTAL PLUG IN MODULE: Recent topics
@@ -62,7 +52,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
@@ -71,7 +61,7 @@ class ppi_recent_topics
/**
* IPS Global object
*
* @var string
* @var object
*/
var $ipsclass;
@@ -83,6 +73,15 @@ class ppi_recent_topics
*/
var $portal_object = array();
/**
* Maximum number of days to check:
* limits resource usage. Set to 0
* for no days restriction.
*
* @var int
*/
var $max_days = 20;
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
@@ -116,10 +115,12 @@ class ppi_recent_topics
{
return;
}
$time_restrict = $this->max_days ? " AND start_date > " . ( time() - 60 * 60 * 24 * $this->max_days ) : '';
$this->ipsclass->DB->simple_construct( array( 'select' => 'tid, title, posts, starter_id as member_id, starter_name as member_name, start_date as post_date, views',
'from' => 'topics',
'where' => "$qe approved=1 and state != 'closed' and (moved_to is null or moved_to = '')",
'where' => "$qe approved=1 and state != 'closed' and (moved_to is null or moved_to = '')" . $time_restrict,
'order' => 'start_date DESC',
'limit' => array( 0, $limit ) ) );
$this->ipsclass->DB->simple_exec();
@@ -172,6 +173,13 @@ class ppi_recent_topics
$this->ipsclass->vars['recent_topics_article_forum'] = ','.$this->ipsclass->vars['recent_topics_article_forum'];
}
$time_restrict = $this->max_days ? " AND t.start_date > " . ( time() - 60 * 60 * 24 * $this->max_days * 2 ) : '';
if( $time_restrict )
{
$qe .= $time_restrict;
}
$this->ipsclass->DB->cache_add_query( 'portal_get_monster_bitch', array( 'csite_article_forum' => $this->ipsclass->vars['recent_topics_article_forum'], 'qe' => $qe, 'limit' => $limit ) );
$outer = $this->ipsclass->DB->cache_exec_query();
@@ -199,6 +207,12 @@ class ppi_recent_topics
$entry['posts'] = $this->ipsclass->do_number_format(intval($entry['posts']));
$entry['views'] = $this->ipsclass->do_number_format($entry['views']);
if( !$entry['author_id'] )
{
$entry['member_name'] = $this->ipsclass->vars['guest_name_pre'] . $entry['author_name'] . $this->ipsclass->vars['guest_name_suf'];
$entry['member_id'] = 0;
}
//-----------------------------------------
// LINKS
//-----------------------------------------
@@ -241,28 +255,38 @@ class ppi_recent_topics
//-----------------------------------------
$attach_pids[ $entry['pid'] ] = $entry['pid'];
//-----------------------------------------
// Format posts
//-----------------------------------------
$this->portal_object['parser']->parse_html = ( $this->ipsclass->cache['forum_cache'][ $entry['forum_id'] ]['use_html'] and $entry['post_htmlstate'] ) ? 1 : 0;
$this->portal_object['parser']->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->portal_object['parser']->parse_nl2br = $entry['post_htmlstate'] == 2 ? 1 : 0;
$entry['post'] = $this->portal_object['parser']->pre_display_parse( $entry['post'] );
//-----------------------------------------
// Avatar
//-----------------------------------------
$entry['avatar'] = $this->ipsclass->get_avatar( $entry['avatar_location'], 1, $entry['avatar_size'], $entry['avatar_type'] );
$entry['avatar'] = $this->ipsclass->get_avatar( $entry['avatar_location'], $this->ipsclass->member['view_avs'], $entry['avatar_size'], $entry['avatar_type'] );
if ( $entry['avatar'] )
{
$entry['avatar'] = $this->ipsclass->compiled_templates['skin_portal']->tmpl_wrap_avatar( $entry['avatar'] );
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $entry['forum_id'] ]['download_perms']) === FALSE )
{
$this->ipsclass->vars['show_img_upload'] = 0;
}
//-----------------------------------------
// View image...
//-----------------------------------------
if ( ! $this->ipsclass->member['view_img'] )
{
//-----------------------------------------
// unconvert smilies first, or it looks a bit crap.
//-----------------------------------------
$entry['post'] = preg_replace( "#<!--emo&(.+?)-->.+?<!--endemo-->#", "\\1" , $entry['post'] );
$entry['post'] = preg_replace( "/<img src=[\"'](.+?)[\"'].+?".">/", "(IMG:<a href='\\1' target='_blank'>\\1</a>) ", $entry['post'] );
}
$html .= $this->ipsclass->compiled_templates['skin_portal']->tmpl_articles_row($entry, $bottom_string, $top_string);
}