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,138 @@
|
||||
<?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 $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > MODULE LOCATION FILE
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Thu 14th April 2005 (17:25)
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| This module has two functions:
|
||||
| get_session_variables: Return the session variables for the class_session functions
|
||||
| parse_online_entries: Parses an array from online.php
|
||||
| See each function for more information
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//-----------------------------------------
|
||||
// This must always be 'components_location_{filename}'
|
||||
//-----------------------------------------
|
||||
|
||||
class components_location_example
|
||||
{
|
||||
var $ipsclass;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// get_session_variables
|
||||
// Returns:
|
||||
// array( '1_type' => {location type #1} [ char(10) ]
|
||||
// '1_id' => {location ID #1} [ int(10) ]
|
||||
// '2_type' => {location type #2} [ char(10) ]
|
||||
// '2_id' => {location ID #2} [ int(10) ]
|
||||
// '3_type' => {location type #3} [ char(10) ]
|
||||
// '3_id' => {location ID #3} [ int(10) ]
|
||||
// );
|
||||
// All are optional.
|
||||
// Use this to populate the 'module_id_*' fields in the session table
|
||||
// so you can check in your own scripts it the member is active in your module
|
||||
// {variable} can be 30 chrs long and alpha numerical
|
||||
// "location" in the sessions table will be the name of the module called
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_session_variables()
|
||||
{
|
||||
return array( '1_type' => 'viewing',
|
||||
'1_id' => intval($this->ipsclass->input['id']) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// parse_online_entries
|
||||
// INPUT: $array IS:
|
||||
// $array[ $session_id ] = $session_array;
|
||||
// Session array is DB row from ibf_sessions
|
||||
// EXPECTED RETURN ------------------------------------
|
||||
// $array[ $session_id ]['_parsed'] = 1;
|
||||
// $array[ $session_id ]['_url'] = {Location url}
|
||||
// $array[ $session_id ]['_text'] = {Location text}
|
||||
// $array[ $session_id ] = $session_array...
|
||||
//
|
||||
// YOU ARE RESPONSIBLE FOR PERMISSION CHECKS. IF THE MEMBER DOESN'T
|
||||
// HAVE PERMISSION RETURN '_url' => $this->ipsclass->base_url,
|
||||
// '_text' => $this->ipsclass->lang['board_index'],
|
||||
// '_parsed' => 1 { as well as the rest of $session_array }
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function parse_online_entries( $array=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$return = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// LOOP
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $array ) and count( $array ) )
|
||||
{
|
||||
foreach( $array as $session_id => $session_array )
|
||||
{
|
||||
if ( $session_array['member_id'] AND $session_array['location_1_type'] == 'viewing' )
|
||||
{
|
||||
$location = $this->ipsclass->base_url.'automodule=example&id='.$session_array['location_1_id'];
|
||||
$text = 'In example, ID '.$session_array['location_1_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$location = $this->ipsclass->base_url;
|
||||
$text = $this->ipsclass->lang['board_index'];
|
||||
}
|
||||
}
|
||||
|
||||
$return[ $session_id ] = array_merge( $session_array, array( '_url' => $location, '_text' => $text, '_parsed' => 1 ) );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user