Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: CALENDAR - CONFIG FILE
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 1st August 2005 (16:22)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file must be named {file_name_minus_php}-cfg.php
|
||||
*
|
||||
* Please see each variable for more information
|
||||
* $PORTAL_CONFIG is OK for each file, do not change
|
||||
* this array name.
|
||||
*/
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
/**
|
||||
* Main plug in title
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board: Êàëåíäàðü';
|
||||
|
||||
/**
|
||||
* Plug in mini description
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_desc'] = "Îòîáðàæàåò ìèíè-êàëåíäàðü íà òåêóùèé ìåñÿö";
|
||||
|
||||
/**
|
||||
* Keyword for settings. This is the keyword
|
||||
* entered into ibf_conf_settings_titles -> conf_title_keyword
|
||||
* Can be left blank.
|
||||
* PLEASE stick to the naming convention when entering a setting
|
||||
* keyword: portal_{file_name_minus_php} This will prevent
|
||||
* other keyword clashes. Likewise, when creating settings, choose
|
||||
* NOT to cache them (they will be loaded at run time) and always
|
||||
* prefix with {file_name_minus_php}_setting_key - for example
|
||||
* If you had a setting called "export_forums" then please name it
|
||||
* "recent_topics_export_forums". This will be available in
|
||||
* $this->ipsclass->vars['recent_topics_export_forums'] in the
|
||||
* main module.
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_settings_keyword'] = "";
|
||||
|
||||
/**
|
||||
* Exportable tags key must be in the naming format of:
|
||||
* {file_name_minus_php}-tag. The value *MUST* be the function
|
||||
* which it corresponds to. For example:
|
||||
* 'recent_topics_last_x' => 'recent_topics_last_x'
|
||||
* The portal will look for function 'recent_topics_last_x' in
|
||||
* module "sources/portal_plugins/recent_topics.php" when it parses
|
||||
* the tag <!--::recent_topics_last_x::-->
|
||||
*
|
||||
* @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']['__another_tag'] = array( '__another_function', '__another_Description' );
|
||||
//$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' );
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $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
|
||||
*/
|
||||
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?
|
||||
|
||||
$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_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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-12-07 15:18:13 +0000 (Wed, 07 Dec 2005) $
|
||||
| > $Revision: 95 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: Gallery - CONFIG FILE
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 1st August 2005 (16:22)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file must be named {file_name_minus_php}-cfg.php
|
||||
*
|
||||
* Please see each variable for more information
|
||||
* $PORTAL_CONFIG is OK for each file, do not change
|
||||
* this array name.
|
||||
*/
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
/**
|
||||
* Main plug in title
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_title'] = 'Invision Power Gallery';
|
||||
|
||||
/**
|
||||
* Plug in mini description
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_desc'] = "Îòîáðàæàåò èíôîðìàöèþ èç ãàëåðåè";
|
||||
|
||||
/**
|
||||
* Keyword for settings. This is the keyword
|
||||
* entered into ibf_conf_settings_titles -> conf_title_keyword
|
||||
* Can be left blank.
|
||||
* PLEASE stick to the naming convention when entering a setting
|
||||
* keyword: portal_{file_name_minus_php} This will prevent
|
||||
* other keyword clashes. Likewise, when creating settings, choose
|
||||
* NOT to cache them (they will be loaded at run time) and always
|
||||
* prefix with {file_name_minus_php}_setting_key - for example
|
||||
* If you had a setting called "export_forums" then please name it
|
||||
* "recent_topics_export_forums". This will be available in
|
||||
* $this->ipsclass->vars['recent_topics_export_forums'] in the
|
||||
* main module.
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_settings_keyword'] = "";
|
||||
|
||||
/**
|
||||
* Exportable tags key must be in the naming format of:
|
||||
* {file_name_minus_php}-tag. The value *MUST* be the function
|
||||
* which it corresponds to. For example:
|
||||
* 'recent_topics_last_x' => 'recent_topics_last_x'
|
||||
* The portal will look for function 'recent_topics_last_x' in
|
||||
* module "sources/portal_plugins/recent_topics.php" when it parses
|
||||
* the tag <!--::recent_topics_last_x::-->
|
||||
*
|
||||
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_exportable_tags']['gallery_show_random_image'] = array( 'gallery_show_random_image', "Îòîáðàæàåò ñëó÷àéíîå èçîáðàæåíèå èç ïîëüçîâàòåëüñêîì ãàëåðåè" );
|
||||
//$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' );
|
||||
//$PORTAL_CONFIG['pc_exportable_tags']['__another_tag'] = array( '__another_function', '__another_Description' );
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-12-30 23:02:19 +0000 (Fri, 30 Dec 2005) $
|
||||
| > $Revision: 109 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: Gallery
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Tuesday 2nd August 2005 (12:56)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* Portal Gallery functions
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage PortalPlugIn
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Gallery 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
|
||||
*/
|
||||
class ppi_gallery
|
||||
{
|
||||
/**
|
||||
* IPS Global object
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $ipsclass;
|
||||
var $glib;
|
||||
var $img_list;
|
||||
var $category;
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
/*
|
||||
* Root path */
|
||||
$this->ipsclass->gallery_root = "./modules/gallery/";
|
||||
|
||||
if( !is_dir( $this->ipsclass->gallery_root ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Load up gallery's library file */
|
||||
require( $this->ipsclass->gallery_root.'lib/gallery_library.php' );
|
||||
$this->glib = new gallery_lib();
|
||||
$this->glib->ipsclass = &$this->ipsclass;
|
||||
|
||||
/*
|
||||
* Image listing */
|
||||
require( $this->ipsclass->gallery_root . 'lib/imagelisting.php' );
|
||||
$this->img_list = new ImageListing();
|
||||
$this->img_list->ipsclass =& $this->ipsclass;
|
||||
$this->img_list->glib =& $this->glib;
|
||||
$this->img_list->init();
|
||||
|
||||
/*
|
||||
* Lang and template */
|
||||
$this->ipsclass->load_language( 'lang_gallery' );
|
||||
$this->ipsclass->load_template( 'skin_gallery_portal' );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// MAIN FUNCTION
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Main function
|
||||
*
|
||||
* @return VOID
|
||||
*/
|
||||
function gallery_show_random_image()
|
||||
{
|
||||
if( !is_dir( $this->ipsclass->gallery_root ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
$this->ipsclass->DB->build_query( array(
|
||||
'select' => '*',
|
||||
'from' => 'gallery_images',
|
||||
'where' => 'approved=1',
|
||||
'order' => 'RAND()',
|
||||
'limit' => array( 0,1 ) )
|
||||
);
|
||||
$this->ipsclass->DB->exec_query();
|
||||
$i = $this->ipsclass->DB->fetch_row();
|
||||
$image = $this->glib->make_image_link( $i, $i['thumbnail'] );
|
||||
return $this->ipsclass->compiled_templates['skin_gallery_portal']->tmpl_random_image_wrap( $image );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<head><title>Ошибка < Русская версия Invision Power Board</title></head>
|
||||
<body>
|
||||
<h1>Ошибка < Русская версия Invision Power Board</h1>
|
||||
<hr>
|
||||
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку «<b>Назад</b>»
|
||||
в вашем браузере для возвращения на предыдущую страницу.
|
||||
<hr>
|
||||
<b>Invision Power Board:</b>
|
||||
<ul>
|
||||
<li><a href="http://www.bestwarez.ru" title="BestWarez.Ru - Только лучший Варез!">Русская версия</a></li>
|
||||
<li><a href="http://www.invisionboard.com" title="Official Site">English version</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: ONLINE USERS - CONFIG FILE
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 1st August 2005 (16:22)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file must be named {file_name_minus_php}-cfg.php
|
||||
*
|
||||
* Please see each variable for more information
|
||||
* $PORTAL_CONFIG is OK for each file, do not change
|
||||
* this array name.
|
||||
*/
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
/**
|
||||
* Main plug in title
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board: Àêòèâíûå ïîëüçîâàòåëè';
|
||||
|
||||
/**
|
||||
* Plug in mini description
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_desc'] = "Îòîáðàæàåò òåêóùèõ àêòèâíûõ ïîëüçîâàòåëåé";
|
||||
|
||||
/**
|
||||
* Keyword for settings. This is the keyword
|
||||
* entered into ibf_conf_settings_titles -> conf_title_keyword
|
||||
* Can be left blank.
|
||||
* PLEASE stick to the naming convention when entering a setting
|
||||
* keyword: portal_{file_name_minus_php} This will prevent
|
||||
* other keyword clashes. Likewise, when creating settings, choose
|
||||
* NOT to cache them (they will be loaded at run time) and always
|
||||
* prefix with {file_name_minus_php}_setting_key - for example
|
||||
* If you had a setting called "export_forums" then please name it
|
||||
* "recent_topics_export_forums". This will be available in
|
||||
* $this->ipsclass->vars['recent_topics_export_forums'] in the
|
||||
* main module.
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_settings_keyword'] = "";
|
||||
|
||||
/**
|
||||
* Exportable tags key must be in the naming format of:
|
||||
* {file_name_minus_php}-tag. The value *MUST* be the function
|
||||
* which it corresponds to. For example:
|
||||
* 'recent_topics_last_x' => 'recent_topics_last_x'
|
||||
* The portal will look for function 'recent_topics_last_x' in
|
||||
* module "sources/portal_plugins/recent_topics.php" when it parses
|
||||
* the tag <!--::recent_topics_last_x::-->
|
||||
*
|
||||
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_exportable_tags']['online_users_show'] = array( 'online_users_show', 'Îòîáðàæàåò òåêóùèõ àêòèâíûõ ïîëüçîâàòåëåé' );
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,271 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: SHOW ONLINE USERS
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Tuesday 2nd August 2005 (12:56)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module shows the online users
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage PortalPlugIn
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module shows the online users
|
||||
* 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
|
||||
*/
|
||||
class ppi_online_users
|
||||
{
|
||||
/**
|
||||
* 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 online_users_show()
|
||||
{
|
||||
$this->sep_char = '<{ACTIVE_LIST_SEP}>';
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the users from the DB
|
||||
//-----------------------------------------
|
||||
|
||||
$time = time() - ( ($this->ipsclass->vars['au_cutoff'] ? $this->ipsclass->vars['au_cutoff'] : 15) * 60 );
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, member_id, member_name, login_type, running_time, member_group',
|
||||
'from' => 'sessions',
|
||||
'where' => "running_time > $time",
|
||||
'order' => "running_time DESC"
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
//-----------------------------------------
|
||||
// Cache all printed members
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->vars['au_cutoff'] == "")
|
||||
{
|
||||
$this->ipsclass->vars['au_cutoff'] = 15;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the users from the DB
|
||||
//-----------------------------------------
|
||||
|
||||
$cut_off = $this->ipsclass->vars['au_cutoff'] * 60;
|
||||
$time = time() - $cut_off;
|
||||
$qe = "";
|
||||
$rows = array( 0 => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
|
||||
'running_time' => time(),
|
||||
'member_id' => $this->ipsclass->member['id'],
|
||||
'member_name' => $this->ipsclass->member['members_display_name'],
|
||||
'member_group' => $this->ipsclass->member['mgroup'] ) );
|
||||
|
||||
if ( $this->ipsclass->member['id'] )
|
||||
{
|
||||
$qe = "member_id !=".intval($this->ipsclass->member['id'])." AND ";
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, member_id, member_name, login_type, running_time, member_group',
|
||||
'from' => 'sessions',
|
||||
'where' => $qe." running_time > $time",
|
||||
'order' => "running_time DESC"
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
//-----------------------------------------
|
||||
// FETCH...
|
||||
//-----------------------------------------
|
||||
|
||||
while ($r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$rows[] = $r;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// cache all printed members so we
|
||||
// don't double print them
|
||||
//-----------------------------------------
|
||||
|
||||
$cached = array();
|
||||
|
||||
foreach ( $rows as $result )
|
||||
{
|
||||
$last_date = $this->ipsclass->get_time( $result['running_time'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Bot?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strstr( $result['id'], '_session' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Seen bot of this type yet?
|
||||
//-----------------------------------------
|
||||
|
||||
$botname = preg_replace( '/^(.+?)=/', "\\1", $result['id'] );
|
||||
|
||||
if ( ! $cached[ $result['member_name'] ] )
|
||||
{
|
||||
if ( $this->ipsclass->vars['spider_anon'] )
|
||||
{
|
||||
if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] )
|
||||
{
|
||||
$active['NAMES'] .= "{$result['member_name']}*{$this->sep_char} \n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$active['NAMES'] .= "{$result['member_name']}{$this->sep_char} \n";
|
||||
}
|
||||
|
||||
$cached[ $result['member_name'] ] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Yup, count others as guest
|
||||
//-----------------------------------------
|
||||
|
||||
$active['GUESTS']++;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Guest?
|
||||
//-----------------------------------------
|
||||
|
||||
else if ($result['member_id'] == 0 )
|
||||
{
|
||||
$active['GUESTS']++;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Member?
|
||||
//-----------------------------------------
|
||||
|
||||
else
|
||||
{
|
||||
if ( empty( $cached[ $result['member_id'] ] ) )
|
||||
{
|
||||
$cached[ $result['member_id'] ] = 1;
|
||||
|
||||
$result['prefix'] = $this->ipsclass->cache['group_cache'][ $result['member_group'] ]['prefix'];
|
||||
$result['suffix'] = $this->ipsclass->cache['group_cache'][ $result['member_group'] ]['suffix'];
|
||||
|
||||
if ($result['login_type'])
|
||||
{
|
||||
if ( ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
|
||||
{
|
||||
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>*{$this->sep_char} \n";
|
||||
$active['ANON']++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$active['ANON']++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$active['MEMBERS']++;
|
||||
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>{$this->sep_char} \n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$active['names'] = preg_replace( "/".preg_quote($this->sep_char)."$/", "", trim($active['NAMES']) );
|
||||
|
||||
$active['total'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON'];
|
||||
$active['visitors'] = $active['GUESTS'] + $active['ANON'];
|
||||
$active['members'] = $active['MEMBERS'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse language
|
||||
//-----------------------------------------
|
||||
|
||||
$breakdown = sprintf( $this->ipsclass->lang['online_breakdown'], intval($active['total']) );
|
||||
$split = sprintf( $this->ipsclass->lang['online_split'] , intval($active['members']), intval($active['visitors']) );
|
||||
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_onlineusers($breakdown, $split, $active['names']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: Recent topics - CONFIG FILE
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 1st August 2005 (16:22)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file must be named {file_name_minus_php}-cfg.php
|
||||
*
|
||||
* Please see each variable for more information
|
||||
* $PORTAL_CONFIG is OK for each file, do not change
|
||||
* this array name.
|
||||
*/
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
/**
|
||||
* Main plug in title
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board: Îïðîñ';
|
||||
|
||||
/**
|
||||
* Plug in mini description
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_desc'] = "Îòîáðàæàåò âûáðàííûé îïðîñ";
|
||||
|
||||
/**
|
||||
* Keyword for settings. This is the keyword
|
||||
* entered into ibf_conf_settings_titles -> conf_title_keyword
|
||||
* Can be left blank.
|
||||
* PLEASE stick to the naming convention when entering a setting
|
||||
* keyword: portal_{file_name_minus_php} This will prevent
|
||||
* other keyword clashes. Likewise, when creating settings, choose
|
||||
* NOT to cache them (they will be loaded at run time) and always
|
||||
* prefix with {file_name_minus_php}_setting_key - for example
|
||||
* If you had a setting called "export_forums" then please name it
|
||||
* "recent_topics_export_forums". This will be available in
|
||||
* $this->ipsclass->vars['recent_topics_export_forums'] in the
|
||||
* main module.
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_settings_keyword'] = "portal_poll";
|
||||
|
||||
/**
|
||||
* Exportable tags key must be in the naming format of:
|
||||
* {file_name_minus_php}-tag. The value *MUST* be the function
|
||||
* which it corresponds to. For example:
|
||||
* 'recent_topics_last_x' => 'recent_topics_last_x'
|
||||
* The portal will look for function 'recent_topics_last_x' in
|
||||
* module "sources/portal_plugins/recent_topics.php" when it parses
|
||||
* the tag <!--::recent_topics_last_x::-->
|
||||
*
|
||||
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_exportable_tags']['poll_show_poll'] = array( 'poll_show_poll', 'Îòîáðàæàåò âûáðàííûé îïðîñ' );
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: POLL
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Tuesday 2nd August 2005 (12:56)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module shows a poll. That's it.
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage PortalPlugIn
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module shows a poll. Wooo
|
||||
* 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
|
||||
*/
|
||||
class ppi_poll
|
||||
{
|
||||
/**
|
||||
* 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 poll_show_poll()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$extra = "";
|
||||
$sql = "";
|
||||
$check = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Got a poll?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->vars['poll_poll_url'] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the topic ID of the entered URL
|
||||
//-----------------------------------------
|
||||
|
||||
preg_match( "/(\?|&)?(t|showtopic)=(\d+)($|&)/", $this->ipsclass->vars['poll_poll_url'], $match );
|
||||
|
||||
$tid = intval(trim($match[3]));
|
||||
|
||||
if ($tid == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get topic...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_public/topics.php' );
|
||||
$this->topic = new topics();
|
||||
$this->topic->ipsclass =& $this->ipsclass;
|
||||
$this->topic->topic_init();
|
||||
|
||||
$this->topic->topic = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => "tid=".$tid,
|
||||
) );
|
||||
|
||||
$this->topic->forum = $this->ipsclass->forums->forum_by_id[ $this->topic->topic['forum_id'] ];
|
||||
|
||||
$this->ipsclass->input['f'] = $this->topic->forum['id'];
|
||||
$this->ipsclass->input['t'] = $tid;
|
||||
|
||||
if ( $this->topic->topic['poll_state'] )
|
||||
{
|
||||
$html = $this->topic->parse_poll();
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_poll_wrapper( $html, $tid );
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: Recent topics - CONFIG FILE
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 1st August 2005 (16:22)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file must be named {file_name_minus_php}-cfg.php
|
||||
*
|
||||
* Please see each variable for more information
|
||||
* $PORTAL_CONFIG is OK for each file, do not change
|
||||
* this array name.
|
||||
*/
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
/**
|
||||
* Main plug in title
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_title'] = 'Invision Power Board: Ïîñëåäíèå íîâîñòè è îáñóæäåíèÿ';
|
||||
|
||||
/**
|
||||
* Plug in mini description
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_desc'] = "Îòîáðàæàåò ïîñëåäíèå òåìû íà ôîðóìå, à òàêæå òåìû-íîâîñòè ñ ïåðâûì ñîîáùåíèåì èç íèõ";
|
||||
|
||||
/**
|
||||
* Keyword for settings. This is the keyword
|
||||
* entered into ibf_conf_settings_titles -> conf_title_keyword
|
||||
* Can be left blank.
|
||||
* PLEASE stick to the naming convention when entering a setting
|
||||
* keyword: portal_{file_name_minus_php} This will prevent
|
||||
* other keyword clashes. Likewise, when creating settings, choose
|
||||
* NOT to cache them (they will be loaded at run time) and always
|
||||
* prefix with {file_name_minus_php}_setting_key - for example
|
||||
* If you had a setting called "export_forums" then please name it
|
||||
* "recent_topics_export_forums". This will be available in
|
||||
* $this->ipsclass->vars['recent_topics_export_forums'] in the
|
||||
* main module.
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_settings_keyword'] = "portal_recent_topics";
|
||||
|
||||
/**
|
||||
* Exportable tags key must be in the naming format of:
|
||||
* {file_name_minus_php}-tag. The value *MUST* be the function
|
||||
* which it corresponds to. For example:
|
||||
* 'recent_topics_last_x' => 'recent_topics_last_x'
|
||||
* The portal will look for function 'recent_topics_last_x' in
|
||||
* module "sources/portal_plugins/recent_topics.php" when it parses
|
||||
* the tag <!--::recent_topics_last_x::-->
|
||||
*
|
||||
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_last_x'] = array( 'recent_topics_last_x' , 'Îòîáðàæàåò ïîñëåäíèå X òåì èç âûáðàííûõ ôîðóìîâ' );
|
||||
$PORTAL_CONFIG['pc_exportable_tags']['recent_topics_discussions_last_x'] = array( 'recent_topics_discussions_last_x', 'Îòîáðàæàåò X çàãîëîâêîâ ïîñëåäíèõ òåì èç âñåõ ôîðóìîâ' );
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,335 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| 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: 2005-12-06 17:36:43 +0000 (Tue, 06 Dec 2005) $
|
||||
| > $Revision: 94 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL PLUG IN MODULE: Recent topics
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 1st August 2005 (16:22)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module displays the recently posted topic title and
|
||||
* first post.
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage PortalPlugIn
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Portal Plug In Module
|
||||
*
|
||||
* This module displays the recently posted topic title and
|
||||
* first post.
|
||||
* 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
|
||||
*/
|
||||
class ppi_recent_topics
|
||||
{
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SHOW RECENT DISCUSSIONS X
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function recent_topics_discussions_last_x()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$html = "";
|
||||
$limit = $this->ipsclass->vars['recent_topics_discuss_number'] ? $this->ipsclass->vars['recent_topics_discuss_number'] : 5;
|
||||
|
||||
if ( count( $this->portal_object['good_forum'] ) > 0 )
|
||||
{
|
||||
$qe = "forum_id IN(".implode(',', $this->portal_object['good_forum'] ).") AND ";
|
||||
}
|
||||
|
||||
$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 = '')",
|
||||
'order' => 'start_date DESC',
|
||||
'limit' => array( 0, $limit ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$html .= $this->_tmpl_format_topic($row, 30);
|
||||
}
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_latestposts($html);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SHOW RECENT TOPICS X
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Show the actual topics w/post
|
||||
*
|
||||
* @return VOID
|
||||
*/
|
||||
function recent_topics_last_x()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$html = "";
|
||||
$attach_pids = array();
|
||||
$attach_posts = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab articles new/recent in 1 bad ass query
|
||||
//-----------------------------------------
|
||||
|
||||
$limit = intval($this->ipsclass->vars['recent_topics_article_max']);
|
||||
|
||||
if ( count( $this->portal_object['bad_forum'] ) > 0 )
|
||||
{
|
||||
$qe = " AND t.forum_id NOT IN(".implode(',', $this->portal_object['bad_forum'] ).") ";
|
||||
}
|
||||
|
||||
if ( count( $this->portal_object['good_forum'] ) > 0 )
|
||||
{
|
||||
$qe .= " AND t.forum_id IN(".implode(',', $this->portal_object['good_forum'] ).") ";
|
||||
}
|
||||
|
||||
if ( $this->ipsclass->vars['recent_topics_article_forum'] )
|
||||
{
|
||||
$this->ipsclass->vars['recent_topics_article_forum'] = ','.$this->ipsclass->vars['recent_topics_article_forum'];
|
||||
}
|
||||
|
||||
$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();
|
||||
|
||||
//-----------------------------------------
|
||||
// Loop through..
|
||||
//-----------------------------------------
|
||||
|
||||
while( $entry = $this->ipsclass->DB->fetch_row($outer) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$bottom_string = "";
|
||||
$read_more = "";
|
||||
$top_string = "";
|
||||
$got_these_attach = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// BASIC INFO
|
||||
//-----------------------------------------
|
||||
|
||||
$real_posts = $entry['posts'];
|
||||
$entry['title'] = strip_tags($entry['title']);
|
||||
$entry['posts'] = $this->ipsclass->do_number_format(intval($entry['posts']));
|
||||
$entry['views'] = $this->ipsclass->do_number_format($entry['views']);
|
||||
|
||||
//-----------------------------------------
|
||||
// LINKS
|
||||
//-----------------------------------------
|
||||
|
||||
$comment_link = $this->ipsclass->compiled_templates['skin_portal']->tmpl_comment_link($entry['tid']);
|
||||
$profile_link = $this->ipsclass->make_profile_link( $entry['last_poster_name'], $entry['last_poster_id'] );
|
||||
|
||||
if ( $real_posts > 0 )
|
||||
{
|
||||
$bottom_string = sprintf( $this->ipsclass->lang['article_reply'], $entry['views'], $comment_link, $profile_link );
|
||||
}
|
||||
else
|
||||
{
|
||||
$bottom_string = sprintf( $this->ipsclass->lang['article_noreply'], $entry['views'], $comment_link );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up date
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->vars['csite_article_date'] = $this->ipsclass->vars['csite_article_date'] ? $this->ipsclass->vars['csite_article_date'] : 'm-j-y H:i';
|
||||
|
||||
//-----------------------------------------
|
||||
// Get Date
|
||||
//-----------------------------------------
|
||||
|
||||
$entry['date'] = gmdate( $this->ipsclass->vars['csite_article_date'], $entry['post_date'] + $this->ipsclass->get_time_offset() );
|
||||
|
||||
$top_string = sprintf(
|
||||
$this->ipsclass->lang['article_postedby'],
|
||||
$this->ipsclass->make_profile_link( $entry['member_name'], $entry['member_id'] ),
|
||||
$entry['date'],
|
||||
$entry['posts']
|
||||
);
|
||||
|
||||
$entry['post'] = str_replace( '<br>', '<br />', $entry['post'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Attachments?
|
||||
//-----------------------------------------
|
||||
|
||||
preg_match_all( "#\[attachmentid=(\d+)\]#is", $entry['post'], $match );
|
||||
|
||||
if ( is_array($match[0]) and count($match[0]) )
|
||||
{
|
||||
for ( $i = 0 ; $i < count($match[0]) ; $i++ )
|
||||
{
|
||||
if ( $match[1][$i] )
|
||||
{
|
||||
$attach_pids[ $match[1][$i] ] = $match[1][$i];
|
||||
}
|
||||
}
|
||||
|
||||
$got_these_attach = 1;
|
||||
}
|
||||
|
||||
if( $entry['topic_hasattach'] > 0 && $got_these_attach == 0 )
|
||||
{
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_pid={$entry['topic_firstpost']}" ) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$these_attach = array();
|
||||
|
||||
while( $att = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$attach_pids[$att['attach_id']] = $att['attach_id'];
|
||||
$these_attach[] = $att['attach_id'];
|
||||
}
|
||||
|
||||
foreach($these_attach as $k => $v )
|
||||
{
|
||||
$entry['post'] .= "<br />\n[attachmentid={$v}]";
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// 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'] );
|
||||
|
||||
if ( $entry['avatar'] )
|
||||
{
|
||||
$entry['avatar'] = $this->ipsclass->compiled_templates['skin_portal']->tmpl_wrap_avatar( $entry['avatar'] );
|
||||
}
|
||||
|
||||
$html .= $this->ipsclass->compiled_templates['skin_portal']->tmpl_articles_row($entry, $bottom_string, $top_string);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Process Attachments
|
||||
//-----------------------------------------
|
||||
|
||||
if ( count( $attach_pids ) )
|
||||
{
|
||||
require_once( ROOT_PATH.'sources/action_public/topics.php' );
|
||||
$this->topic = new topics();
|
||||
$this->topic->ipsclass =& $this->ipsclass;
|
||||
$this->topic->topic_init();
|
||||
|
||||
$html = $this->topic->parse_attachments( $html, $attach_pids , 'attach_id' );
|
||||
}
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_articles($html);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Format topic entry
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function _tmpl_format_topic($entry, $cut)
|
||||
{
|
||||
$entry['title'] = strip_tags($entry['title']);
|
||||
$entry['title'] = str_replace( "!" , "!" , $entry['title'] );
|
||||
$entry['title'] = str_replace( """, "\"", $entry['title'] );
|
||||
|
||||
if (strlen($entry['title']) > $cut)
|
||||
{
|
||||
$entry['title'] = substr( $entry['title'],0,($cut - 3) ) . "...";
|
||||
$entry['title'] = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$entry['title'] );
|
||||
}
|
||||
|
||||
$entry['posts'] = $this->ipsclass->do_number_format($entry['posts']);
|
||||
$entry['views'] = $this->ipsclass->do_number_format($entry['views']);
|
||||
|
||||
$this->ipsclass->vars['csite_article_date'] = $this->ipsclass->vars['csite_article_date'] ? $this->ipsclass->vars['csite_article_date'] : 'm-j-y H:i';
|
||||
|
||||
$entry['date'] = gmdate( $this->ipsclass->vars['csite_article_date'], $entry['post_date'] + $this->ipsclass->get_time_offset() );
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_topic_row($entry['tid'], $entry['title'], $entry['posts'], $entry['views'], $entry['member_id'], $entry['member_name'], $entry['date']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user