Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 8129 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* $Author: AndyMillne $
|
||||
* @since 2.2.0
|
||||
* $LastChangedDate: 2011-12-20 11:14:05 -0500 (Tue, 20 Dec 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10035 $
|
||||
* $LastChangedDate: 2013-03-21 17:38:09 -0400 (Thu, 21 Mar 2013) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 12109 $
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'apiCore' ) )
|
||||
@@ -61,7 +61,7 @@ class apiTopicView extends apiCore
|
||||
* @param boolean Load only topics viewable by guests?
|
||||
* @return @e array Array of topics data
|
||||
*/
|
||||
public function return_topic_list_data( $view_as_guest=false )
|
||||
public function return_topic_list_data( $view_as_guest=false, $parse_display=false )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -168,6 +168,24 @@ class apiTopicView extends apiCore
|
||||
$row['link-forum'] = $this->registry->getClass('output')->buildSEOUrl( "showforum={$row['forum_id']}", 'public', $row['name_seo'], 'showforum' );
|
||||
$row['link-profile'] = $this->registry->getClass('output')->buildSEOUrl( "showuser={$row['member_id']}", 'public', $row['members_seo_name'], 'showuser' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse for display - http://community.invisionpower.com/resources/bugs.html/_/ip-board/xml-rpc-returning-bbcode-r41329
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $parse_display )
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
|
||||
$parser = new $classToLoad();
|
||||
|
||||
/* Set up some settings */
|
||||
$parser->set( array( 'parseArea' => 'topics',
|
||||
'parseBBCode' => true,
|
||||
'parseHtml' => true,
|
||||
'parseEmoticons' => true ) );
|
||||
|
||||
$row['post'] = $parser->display( $row['post'] );
|
||||
}
|
||||
|
||||
$topics[] = $row;
|
||||
}
|
||||
|
||||
@@ -177,7 +195,7 @@ class apiTopicView extends apiCore
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'attachments',
|
||||
'where' => "attach_rel_module='post' AND attach_rel_id IN (" . implode( ",", $this->attach_pids ) . ")"
|
||||
'where' => "attach_rel_module='post' AND attach_rel_id IN (" . IPSText::cleanPermString( implode( ",", $this->attach_pids ) ) . ")"
|
||||
) );
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: bfarber $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 9296 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Member property updater (AJAX)
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Downloads
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 11401 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -159,43 +159,53 @@ class comments_core_reports extends classes_comments_renderer
|
||||
*/
|
||||
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||
{
|
||||
|
||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $this->memberData['member_id'] ), "id=" . $parentId );
|
||||
|
||||
$report = $this->fetchParent( $parentId );
|
||||
|
||||
//-----------------------------------------
|
||||
// Notify other moderators
|
||||
//-----------------------------------------
|
||||
//-----------------------------------------
|
||||
|
||||
$report = $this->fetchParent( $parentId );
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
|
||||
|
||||
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
|
||||
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
|
||||
$notify = new $classToLoad( $this->registry );
|
||||
|
||||
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
|
||||
|
||||
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
|
||||
{
|
||||
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
|
||||
}
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
|
||||
|
||||
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
|
||||
|
||||
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
|
||||
|
||||
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
|
||||
$notify->sendReplyNotifications( $array['comment_text'] );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
|
||||
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
|
||||
$notify = new $classToLoad( $this->registry );
|
||||
|
||||
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
|
||||
|
||||
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
|
||||
{
|
||||
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
|
||||
}
|
||||
|
||||
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
|
||||
|
||||
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
|
||||
$notify->sendReplyNotifications( $array['comment_text'] );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Mark read
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->classItemMarking->markRead( array( 'forumID' => 0, 'itemID' => $report['id'] ), 'core' );
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Core Sessions
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -28,9 +28,9 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Item Marking
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -38,7 +38,7 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Downloads
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Core registered caches, redirect resets and bitwise settings
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -14,7 +14,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,231 +1,335 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Dashboard Notifications
|
||||
* Last Updated: 11.07.2012
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 11026 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
* DO NOT MODIFY!
|
||||
*/
|
||||
class dashboardNotifications__core
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $settings;
|
||||
public $lang;
|
||||
public $cache;
|
||||
public $caches;
|
||||
public $DB;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->settings = ipsRegistry::fetchSettings();
|
||||
$this->lang = ipsRegistry::getClass('class_localization');
|
||||
$this->caches =& ipsRegistry::cache()->fetchCaches();
|
||||
$this->cache = ipsRegistry::cache();
|
||||
$this->DB = ipsRegistry::DB();
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
/* INIT! */
|
||||
$entries = array();
|
||||
|
||||
if( ! $this->settings['ipb_reg_number'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
|
||||
}
|
||||
|
||||
/* FURL cache OOD? */
|
||||
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
|
||||
{
|
||||
$mtime = intval( @filemtime( IPS_CACHE_PATH . 'cache/furlCache.php' ) );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) );
|
||||
|
||||
if ( $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['furlcache_outofdate'], sprintf( $this->lang->words['furlcache_outofdate_desc'], $application['app_title'] ) . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=seoRebuild'>{$this->lang->words['rebuild_furl_cache']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Sphinx cache OOD? */
|
||||
if ( $this->settings['search_method'] == 'sphinx' )
|
||||
{
|
||||
$mtime = intval( $this->cache->getCache('sphinx_config') );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) );
|
||||
|
||||
if ( !$mtime OR $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['sphinxconfig_outofdate'], $this->lang->words['sphinxconfig_outofdate_desc'] . ' ' . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=applications_overview'>{$this->lang->words['rebuild_sphinx_config']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Minify on but /cache/tmp not writeable? */
|
||||
if ( !empty( $this->settings['_use_minify'] ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] );
|
||||
}
|
||||
|
||||
/* Installer Check */
|
||||
if( @is_file( IPS_ROOT_PATH . 'install/index.php' ) )
|
||||
{
|
||||
if ( ! @is_file( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) )
|
||||
{
|
||||
$this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY );
|
||||
$entries[] = array( $this->lang->words['cp_unlockedinstaller'], $this->lang->words['cp_unlocked_warning'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Unfinished Upgrade */
|
||||
require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' );/*noLibHook*/
|
||||
$versions = IPSSetUp::fetchAppVersionNumbers( 'core' );
|
||||
|
||||
if( $versions['current'][0] != $versions['latest'][0] )
|
||||
{
|
||||
$this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] );
|
||||
|
||||
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* PHP Version Check
|
||||
*
|
||||
* @todo Remove this for 4.0? Installer/upgrader already do check for this anyway...
|
||||
*/
|
||||
if( PHP_VERSION < '5.2.0' )
|
||||
{
|
||||
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
|
||||
}
|
||||
|
||||
/* Outgoing email address specified */
|
||||
if ( !$this->settings['email_out'] OR !$this->settings['email_in'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_missingemail'], "{$this->lang->words['cp_missingemail1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=email'>{$this->lang->words['cp_missingemail2']}</a>" );
|
||||
}
|
||||
|
||||
/* Board Offline Check */
|
||||
if ( $this->settings['board_offline'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=boardoffline'>{$this->lang->words['cp_boardoffline2']}</a>" );
|
||||
}
|
||||
|
||||
/* Fulltext Check */
|
||||
if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=searchsetup'>{$this->lang->words['fulltext_find']}</a>" );
|
||||
}
|
||||
|
||||
/* Make sure the profile directory is writable */
|
||||
if( ! is_dir( $this->settings['upload_dir'] . '/profile/' ) || ! is_writable( $this->settings['upload_dir'] . '/profile/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_profilephotoerr_title'], sprintf( $this->lang->words['cp_profilephotoerr_msg'], $this->settings['upload_dir'] . '/profile/' ) );
|
||||
}
|
||||
|
||||
/* Check for upgrade finish folder */
|
||||
if( is_dir( IPS_ROOT_PATH . 'upgradeFinish/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_upgradefinishfolder'], sprintf( $this->lang->words['cp_upgradefinishfolder_msg'], IPS_ROOT_PATH . 'upgradeFinish/' ) );
|
||||
}
|
||||
|
||||
/* Check to see if GD is intalled */
|
||||
if(! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_gdnotinstalled_title'], $this->lang->words['cp_gdnotinstalled_msg'] );
|
||||
}
|
||||
|
||||
/* Performance mode check */
|
||||
$perfMode = $this->cache->getCache('performanceCache');
|
||||
|
||||
if( is_array( $perfMode ) && count( $perfMode ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_perfmodeon_title'], $this->lang->words['cp_perfmodeon_msg'] );
|
||||
}
|
||||
|
||||
/* Suhosin check */
|
||||
if( extension_loaded( 'suhosin' ) )
|
||||
{
|
||||
$_postMaxVars = @ini_get('suhosin.post.max_vars');
|
||||
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
|
||||
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
|
||||
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
|
||||
|
||||
if( $_postMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue1'], $_postMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_postMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* SQL error check */
|
||||
/*if ( is_file( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ) )
|
||||
{
|
||||
$unix = @filemtime( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' );
|
||||
|
||||
if ( $unix )
|
||||
{
|
||||
$mtime = gmdate( 'd-j-Y', $unix );
|
||||
$now = gmdate( 'd-j-Y', time() );
|
||||
|
||||
if ( $mtime == $now )
|
||||
{
|
||||
// Display a message
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return $entries;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Dashboard Notifications
|
||||
* Last Updated: $Date
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 12238 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
*/
|
||||
class dashboardNotifications__core
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $settings;
|
||||
public $lang;
|
||||
public $cache;
|
||||
public $caches;
|
||||
public $DB;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->settings = ipsRegistry::fetchSettings();
|
||||
$this->lang = ipsRegistry::getClass('class_localization');
|
||||
$this->caches =& ipsRegistry::cache()->fetchCaches();
|
||||
$this->cache = ipsRegistry::cache();
|
||||
$this->DB = ipsRegistry::DB();
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
/* INIT */
|
||||
$entries = array();
|
||||
|
||||
if( ! $this->settings['ipb_reg_number'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Is the Spam Service Working? */
|
||||
if ( $this->settings['spam_service_enabled'] )
|
||||
{
|
||||
$GOT_SPAM_ERROR = false;
|
||||
|
||||
/* Are we entitled to it? */
|
||||
$licenseData = $this->cache->getCache( 'licenseData' );
|
||||
|
||||
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
|
||||
{
|
||||
foreach ( $licenseData['ipbMain'] as $data )
|
||||
{
|
||||
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] != 'Ok' )
|
||||
{
|
||||
$disableLink = $this->settings['base_url'] . "app=core&module=settings&section=settings&do=findsetting&key=spamservice";
|
||||
|
||||
if ( is_numeric( $data['_expires'] ) && time() > $data['_expires'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_expired'], $disableLink ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_unavailable'], $disableLink ) );
|
||||
}
|
||||
|
||||
$GOT_SPAM_ERROR = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $GOT_SPAM_ERROR )
|
||||
{
|
||||
/* Get last 5 logs, and if all 5 are errors, show message */
|
||||
$_errors = 0;
|
||||
$_entries = 0;
|
||||
$_lastError = '';
|
||||
|
||||
$this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $_r = $this->DB->fetch() )
|
||||
{
|
||||
$_entries++;
|
||||
|
||||
if( $_r['log_code'] === '0' )
|
||||
{
|
||||
$_errors++;
|
||||
|
||||
if( !$_lastError )
|
||||
{
|
||||
$_lastError = $_r['log_msg'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $_entries > 0 && $_errors == $_entries )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
/* If it's disabled, are we entitiled to it? */
|
||||
else
|
||||
{
|
||||
$licenseData = $this->cache->getCache( 'licenseData' );
|
||||
|
||||
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
|
||||
{
|
||||
foreach ( $licenseData['ipbMain'] as $data )
|
||||
{
|
||||
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* FURL cache OOD? */
|
||||
if ( is_file( FURL_CACHE_PATH ) )
|
||||
{
|
||||
$mtime = intval( @filemtime( FURL_CACHE_PATH ) );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
$furltemplatesfile = IPSLib::getAppDir( $app_dir );
|
||||
if(IPB_USE_ONLY_ID_FURL && is_file( $furltemplatesfile.'/extensions/furlTemplatesID.php'))
|
||||
{
|
||||
$furltemplatesfile.='/extensions/furlTemplatesID.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
$furltemplatesfile.='/extensions/furlTemplates.php';
|
||||
}
|
||||
|
||||
if ( is_file( $furltemplatesfile ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( $furltemplatesfile ) );
|
||||
|
||||
if ( $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['furlcache_outofdate'], sprintf( $this->lang->words['furlcache_outofdate_desc'], $application['app_title'] ) . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=seoRebuild'>{$this->lang->words['rebuild_furl_cache']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Sphinx cache OOD? */
|
||||
if ( $this->settings['search_method'] == 'sphinx' )
|
||||
{
|
||||
$mtime = intval( $this->cache->getCache('sphinx_config') );
|
||||
|
||||
/* Check mtimes on extensions.. */
|
||||
foreach( ipsRegistry::$applications as $app_dir => $application )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) )
|
||||
{
|
||||
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) );
|
||||
|
||||
if ( !$mtime OR $_mtime > $mtime )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['sphinxconfig_outofdate'], $this->lang->words['sphinxconfig_outofdate_desc'] . ' ' . "<a href='" . $this->settings['base_url'] . "app=core&module=applications&section=applications&do=applications_overview'>{$this->lang->words['rebuild_sphinx_config']}</a>" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Minify on but /cache/tmp not writeable? */
|
||||
if ( !empty( $this->settings['_use_minify'] ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] );
|
||||
}
|
||||
|
||||
/* Installer Check */
|
||||
if( @is_file( IPS_ROOT_PATH . 'install/index.php' ) )
|
||||
{
|
||||
if ( ! @is_file( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) )
|
||||
{
|
||||
$this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY );
|
||||
$entries[] = array( $this->lang->words['cp_unlockedinstaller'], $this->lang->words['cp_unlocked_warning'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Unfinished Upgrade */
|
||||
require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' );/*noLibHook*/
|
||||
$versions = IPSSetUp::fetchAppVersionNumbers( 'core' );
|
||||
|
||||
if( $versions['current'][0] != $versions['latest'][0] )
|
||||
{
|
||||
$this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] );
|
||||
|
||||
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* PHP Version Check
|
||||
*
|
||||
* @todo Remove this for 4.0? Installer/upgrader already do check for this anyway...
|
||||
*/
|
||||
if( PHP_VERSION < '5.2.0' )
|
||||
{
|
||||
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
|
||||
}
|
||||
|
||||
/* Outgoing email address specified */
|
||||
if ( !$this->settings['email_out'] OR !$this->settings['email_in'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_missingemail'], "{$this->lang->words['cp_missingemail1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=email'>{$this->lang->words['cp_missingemail2']}</a>" );
|
||||
}
|
||||
|
||||
/* Board Offline Check */
|
||||
if ( $this->settings['board_offline'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=boardoffline'>{$this->lang->words['cp_boardoffline2']}</a>" );
|
||||
}
|
||||
|
||||
/* Fulltext Check */
|
||||
if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&module=settings&section=settings&do=findsetting&key=searchsetup'>{$this->lang->words['fulltext_find']}</a>" );
|
||||
}
|
||||
|
||||
/* Make sure the profile directory is writable */
|
||||
if( ! is_dir( $this->settings['upload_dir'] . '/profile/' ) || ! is_writable( $this->settings['upload_dir'] . '/profile/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_profilephotoerr_title'], sprintf( $this->lang->words['cp_profilephotoerr_msg'], $this->settings['upload_dir'] . '/profile/' ) );
|
||||
}
|
||||
|
||||
/* Check for upgrade finish folder */
|
||||
if( is_dir( IPS_ROOT_PATH . 'upgradeFinish/' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_upgradefinishfolder'], sprintf( $this->lang->words['cp_upgradefinishfolder_msg'], IPS_ROOT_PATH . 'upgradeFinish/' ) );
|
||||
}
|
||||
|
||||
/* Check to see if GD is intalled */
|
||||
if(! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_gdnotinstalled_title'], $this->lang->words['cp_gdnotinstalled_msg'] );
|
||||
}
|
||||
|
||||
/* Performance mode check */
|
||||
$perfMode = $this->cache->getCache('performanceCache');
|
||||
|
||||
if( is_array( $perfMode ) && count( $perfMode ) )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_perfmodeon_title'], $this->lang->words['cp_perfmodeon_msg'] );
|
||||
}
|
||||
|
||||
/* Suhosin check */
|
||||
if( extension_loaded( 'suhosin' ) )
|
||||
{
|
||||
$_postMaxVars = @ini_get('suhosin.post.max_vars');
|
||||
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
|
||||
$_getMaxLen = @ini_get('suhosin.get.max_value_length');
|
||||
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
|
||||
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
|
||||
$_reqMaxVar = @ini_get('suhosin.request.max_varname_length');
|
||||
|
||||
if( $_postMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue1'], $_postMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxVars < 4096 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
|
||||
}
|
||||
|
||||
if( $_getMaxLen < 2000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue6'], $_getMaxLen ) );
|
||||
}
|
||||
|
||||
if( $_postMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxLen < 1000000 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
|
||||
}
|
||||
|
||||
if( $_reqMaxVar < 350 )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue5'], $_reqMaxVar ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* SQL error check */
|
||||
/*if ( is_file( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ) )
|
||||
{
|
||||
$unix = @filemtime( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' );
|
||||
|
||||
if ( $unix )
|
||||
{
|
||||
$mtime = gmdate( 'd-j-Y', $unix );
|
||||
$now = gmdate( 'd-j-Y', time() );
|
||||
|
||||
if ( $mtime == $now )
|
||||
{
|
||||
// Display a message
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return $entries;
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -14,7 +14,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @file facebook.php Community Enhancements - Facebook
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_facebook
|
||||
* @brief Community Enhancements - Facebook
|
||||
*/
|
||||
class enhancements_core_facebook
|
||||
{
|
||||
/**
|
||||
* Applicable Settings
|
||||
*/
|
||||
public $settings = array( 'fbc_enable', 'fbc_appid', 'fbc_secret', 'fbc_mgid', 'fbc_bot_group', 'fb_locale', 'fb_realname' );
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = $registry->getClass('class_localization')->words['enhancements_facebook'];
|
||||
$this->description = $registry->getClass('class_localization')->words['enhancements_facebook_desc'];
|
||||
$this->enabled = ipsRegistry::$settings['fbc_enable'];
|
||||
$this->message = '<a href="http://external.ipslink.com/ipboard30/landing/?p=facebook" target="_blank">' . ipsRegistry::getClass('class_localization')->words['enhancements_facebook_help'] . '</a>';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @file facebook.php Community Enhancements - Google Analytics
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_googleanalytics
|
||||
* @brief Community Enhancements - Google Analytics
|
||||
*/
|
||||
class enhancements_core_googleanalytics
|
||||
{
|
||||
/**
|
||||
* Applicable Settings
|
||||
*/
|
||||
public $settings = array( 'ipseo_ga' );
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = $registry->getClass('class_localization')->words['enhancements_googleanalytics'];
|
||||
$this->description = $registry->getClass('class_localization')->words['enhancements_googleanalytics_desc'];
|
||||
$this->message = "<a href='http://www.google.com/analytics/' target='_blank'>{$registry->getClass('class_localization')->words['enhancements_googleanalytics_help']}</a>";
|
||||
$this->enabled = (bool) ipsRegistry::$settings['ipseo_ga'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @file twitter.php Community Enhancements - IPS Backup
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// admin_core_applications_enhancements::manage()
|
||||
// contains code to disable this enhancement
|
||||
// from showing right now
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_ipsbackup
|
||||
* @brief Community Enhancements - IPS Backup
|
||||
*/
|
||||
class enhancements_core_ipsbackup
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = 'IPS Backup Service';
|
||||
$this->description = 'Automatically backup your community.';
|
||||
$this->icon = '';
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
/**
|
||||
* @file ipscdn.php Community Enhancements - IPS CDN
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_ipscdn
|
||||
* @brief Community Enhancements - IPS CDN
|
||||
*/
|
||||
class enhancements_core_ipscdn
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = $registry->getClass('class_localization')->words['enhancements_ipscdn'];
|
||||
$this->description = $registry->getClass('class_localization')->words['enhancements_ipscdn_desc'];
|
||||
$this->icon = '';
|
||||
$this->enabled = ipsRegistry::$settings['ips_cdn'];
|
||||
|
||||
$this->html = $registry->output->loadTemplate( 'cp_skin_applications' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit Settings
|
||||
*/
|
||||
public function editSettings()
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
|
||||
|
||||
$skinFunctions = new skinCaching( ipsRegistry::instance() );
|
||||
|
||||
if ( ipsRegistry::$request['recache'] )
|
||||
{
|
||||
$skinFunctions->flushipscdn();
|
||||
|
||||
ipsRegistry::getClass('output')->redirect( ipsRegistry::$settings['_base_url'] . "app=core&module=applications&section=enhancements&do=edit&service=enhancements_core_ipscdn", ipsRegistry::getClass('class_localization')->words['cdn_recached'] );
|
||||
}
|
||||
|
||||
if ( ipsRegistry::$request['disable'] )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'ips_cdn' => FALSE, 'ipb_img_url' => '', 'ipb_css_url' => '', 'ipb_js_url' => '', 'upload_url' => '' ) );
|
||||
|
||||
if ( IPSLib::appIsInstalled('gallery') )
|
||||
{
|
||||
$this_script = str_replace( '\\', '/', getenv( 'SCRIPT_FILENAME' ) );
|
||||
$url = ipsRegistry::$settings['_original_base_url'];
|
||||
|
||||
if( $this_script )
|
||||
{
|
||||
$this_script = str_replace( '/'.CP_DIRECTORY.'/index.php', '', $this_script );
|
||||
if ( substr( ipsRegistry::$settings['gallery_images_path'], 0, strlen( $this_script ) ) === $this_script )
|
||||
{
|
||||
$url = str_replace( '\\', '/', str_replace( $this_script, $url, ipsRegistry::$settings['gallery_images_path'] ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$url .= '/uploads';
|
||||
}
|
||||
|
||||
IPSLib::updateSettings( array( 'gallery_images_path' => $url ) );
|
||||
}
|
||||
|
||||
IPSContentCache::truncate( 'post' );
|
||||
IPSContentCache::truncate( 'sig' );
|
||||
|
||||
/* Set skin sets to recache */
|
||||
$skinFunctions->flagSetForRecache();
|
||||
|
||||
ipsRegistry::getClass('output')->redirect( ipsRegistry::$settings['_base_url'] . "app=core&module=applications&section=enhancements", ipsRegistry::getClass('class_localization')->words['cdn_disabled'] );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !ipsRegistry::$settings['ipb_reg_number'] )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_ipscdn_error_nokey'], ipsRegistry::getClass('output')->buildUrl('app=core&module=tools§ion=licensekey', 'admin') ) );
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
||||
$file = new $classToLoad();
|
||||
$return = NULL;
|
||||
|
||||
if ( $json = @json_decode( $ping, TRUE ) )
|
||||
{
|
||||
if ( $json['ENABLED'] and $json['BYTES'] > 0 )
|
||||
{
|
||||
if ( !ipsRegistry::$settings['ips_cdn'] and !ipsRegistry::$request['enable'] )
|
||||
{
|
||||
return $this->html->cdnInactive( $json );
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings = array( 'ips_cdn' => TRUE, 'ipb_img_url' => $json['URL'], 'ipb_css_url' => rtrim( $json['URL'], '/' ) . '/', 'ipb_js_url' => rtrim( $json['URL'], '/' ) . '/', 'upload_url' => $json['URL'] . '/uploads' );
|
||||
if ( IPSLib::appIsInstalled('downloads') )
|
||||
{
|
||||
if ( substr( ipsRegistry::$settings['idm_localsspath'], 0, 11 ) === '{root_path}' )
|
||||
{
|
||||
$settings['idm_screenshot_url'] = str_replace( '{root_path}', $json['URL'], ipsRegistry::$settings['idm_localsspath'] );
|
||||
}
|
||||
}
|
||||
if ( IPSLib::appIsInstalled('gallery') )
|
||||
{
|
||||
$this_script = str_replace( '\\', '/', getenv( 'SCRIPT_FILENAME' ) );
|
||||
if( $this_script )
|
||||
{
|
||||
$this_script = str_replace( '/'.CP_DIRECTORY.'/index.php', '', $this_script );
|
||||
if ( substr( ipsRegistry::$settings['gallery_images_path'], 0, strlen( $this_script ) ) === $this_script )
|
||||
{
|
||||
$settings['gallery_images_url'] = str_replace( '\\', '/', str_replace( $this_script, $json['URL'], ipsRegistry::$settings['gallery_images_path'] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_settings = array();
|
||||
foreach ( $settings as $k => $v )
|
||||
{
|
||||
if ( ipsRegistry::$settings[ $k ] != $v )
|
||||
{
|
||||
$_settings[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !empty( $_settings ) )
|
||||
{
|
||||
IPSLib::updateSettings( $settings );
|
||||
}
|
||||
|
||||
/* Set skin sets to recache */
|
||||
$skinFunctions->flagSetForRecache();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$licenseData = ipsRegistry::cache()->getCache('licenseData');
|
||||
if ( $licenseData['key']['url'] != ipsRegistry::$settings['board_url'] )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( ipsRegistry::getClass('class_localization')->words['enhancements_ipscdn_error_url'] );
|
||||
}
|
||||
|
||||
/* Set skin sets to recache */
|
||||
$skinFunctions->flagSetForRecache();
|
||||
|
||||
return $this->html->cdnNotEnabled( $json );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_ipscdn_error_key'], ipsRegistry::getClass('output')->buildUrl('app=core&module=tools§ion=licensekey', 'admin') ) );
|
||||
}
|
||||
|
||||
return $this->html->cdnOverview( $json );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @file twitter.php Community Enhancements - Twitter
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_twitter
|
||||
* @brief Community Enhancements - Twitter
|
||||
*/
|
||||
class enhancements_core_twitter
|
||||
{
|
||||
/**
|
||||
* Applicable Settings
|
||||
*/
|
||||
public $settings = array( 'tc_enabled', 'tc_token', 'tc_secret', 'tc_mgid' );
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = $registry->getClass('class_localization')->words['enhancements_twitter'];
|
||||
$this->description = $registry->getClass('class_localization')->words['enhancements_twitter_desc'];
|
||||
$this->enabled = ipsRegistry::$settings['tc_enabled'];
|
||||
$this->message = '<a href="http://external.ipslink.com/ipboard30/landing/?p=twitter" target="_blank">' . ipsRegistry::getClass('class_localization')->words['enhancements_twitter_help'] . '</a>';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/**
|
||||
* @file twitter.php Community Enhancements - Viglink
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_viglink
|
||||
* @brief Community Enhancements - Viglink
|
||||
*/
|
||||
class enhancements_core_viglink
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = $registry->getClass('class_localization')->words['enhancements_viglink'];
|
||||
$this->description = $registry->getClass('class_localization')->words['enhancements_viglink_desc'];
|
||||
$this->enabled = ipsRegistry::$settings['viglink_enabled'];
|
||||
|
||||
if ( $this->enabled )
|
||||
{
|
||||
$this->message = sprintf( $registry->getClass('class_localization')->words['viglink_forums_notice'], $registry->output->buildUrl('app=forums', 'admin') );
|
||||
$this->settings = array( 'viglink_enabled' );
|
||||
if ( !ipsRegistry::$settings['viglink_subid'] )
|
||||
{
|
||||
$this->settings[] = 'viglink_api_key';
|
||||
}
|
||||
$this->settings[] = 'viglink_groups';
|
||||
$this->settings[] = 'viglink_norewrite';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit Settings
|
||||
*/
|
||||
public function editSettings()
|
||||
{
|
||||
$json = $this->_makeApiCall();
|
||||
return ipsRegistry::getClass('output')->loadTemplate('cp_skin_applications')->viglinkConvert( $json['URL'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Settings
|
||||
*/
|
||||
public function saveSettings()
|
||||
{
|
||||
if ( isset( ipsRegistry::$request['viglink_manual'] ) )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'viglink_enabled' => '1', 'viglink_api_key' => ipsRegistry::$request['viglink_api_key'], 'viglink_subid' => '' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$json = $this->_makeApiCall();
|
||||
IPSLib::updateSettings( array( 'viglink_enabled' => '1', 'viglink_api_key' => $json['API_KEY'], 'viglink_subid' => $json['SUBID'] ) );
|
||||
}
|
||||
|
||||
ipsRegistry::getClass('output')->silentRedirect( ipsRegistry::$settings['_base_url'] . "app=core&module=applications&section=enhancements&do=edit&service=enhancements_core_viglink" );
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make call to IPS to get API keys
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function _makeApiCall()
|
||||
{
|
||||
$subId = NULL;
|
||||
if ( ipsRegistry::$settings['ipb_reg_number'] )
|
||||
{
|
||||
$exploded = explode( '-', ipsRegistry::$settings['ipb_reg_number'] );
|
||||
if ( isset( $exploded[3] ) )
|
||||
{
|
||||
$subId = $exploded[3];
|
||||
}
|
||||
}
|
||||
if ( $subId === NULL )
|
||||
{
|
||||
$subId = ipsRegistry::$settings['board_url'];
|
||||
if ( strlen( $subId ) > 32 )
|
||||
{
|
||||
$subId = str_replace( array( 'http://', 'https://' ), '', $subId );
|
||||
}
|
||||
if ( strlen( $subId ) > 32 )
|
||||
{
|
||||
$subId = md5( $subId );
|
||||
}
|
||||
}
|
||||
|
||||
require_once IPS_KERNEL_PATH . 'classFileManagement.php';
|
||||
$cfm = new classFileManagement();
|
||||
$return = NULL;
|
||||
if ( $return and $json = @json_decode( $return, TRUE ) and $json['SUCCESS'] == TRUE )
|
||||
{
|
||||
return $json;
|
||||
}
|
||||
else
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( ipsRegistry::getClass('class_localization')->words['enhancements_viglink_error'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
* @file twitter.php Community Enhancements - Windows Live
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @class enhancements_core_windowslive
|
||||
* @brief Community Enhancements - Windows Live
|
||||
*/
|
||||
class enhancements_core_windowslive
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ipsRegistry
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
$this->title = $registry->getClass('class_localization')->words['enhancements_windowslive'];
|
||||
$this->description = $registry->getClass('class_localization')->words['enhancements_windowslive_desc'];
|
||||
|
||||
$this->enabled = FALSE;
|
||||
$loginMethods = ipsRegistry::cache()->getCache('login_methods');
|
||||
foreach ( $loginMethods as $method )
|
||||
{
|
||||
if ( $method['login_folder_name'] == 'live' and $method['login_enabled'] )
|
||||
{
|
||||
$this->enabled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
$this->html = $registry->output->loadTemplate( 'cp_skin_applications' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit Settings
|
||||
*/
|
||||
public function editSettings()
|
||||
{
|
||||
ipsRegistry::getClass('class_permissions')->checkPermissionAutoMsg( 'login_manage' );
|
||||
|
||||
$method = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => "login_folder_name='live'" ) );
|
||||
if ( !$method['login_id'] )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_windowslive_error'], ipsRegistry::$settings['_base_url'] . 'app=core&module=tools&section=login' ) );
|
||||
}
|
||||
|
||||
if ( ipsRegistry::$request['downloadxml'] )
|
||||
{
|
||||
$clientId = ipsRegistry::$request['client_id'];
|
||||
$clientSecret = ipsRegistry::$request['client_secret'];
|
||||
|
||||
header( "Content-Disposition: attachment; filename=\"Application-Key.xml\"" );
|
||||
header( "Content-type: application/xml" );
|
||||
|
||||
echo <<<XML
|
||||
<windowslivelogin>
|
||||
<appid>{$clientId}</appid>
|
||||
<secret>{$clientSecret}</secret>
|
||||
<securityalgorithm>wsignin1.0</securityalgorithm>
|
||||
</windowslivelogin>
|
||||
XML;
|
||||
exit;
|
||||
}
|
||||
|
||||
$config = unserialize( $method['login_custom_config'] );
|
||||
$settings = array( 'enabled' => $this->enabled );
|
||||
if ( $config['key_file_location'] )
|
||||
{
|
||||
$settings['xml'] = $config['key_file_location'];
|
||||
|
||||
$xml = file_get_contents( $settings['xml'] );
|
||||
|
||||
preg_match( "/<appid>(.+?)<\/appid>/" , $xml, $matches );
|
||||
$settings['client_id'] = $matches[1];
|
||||
|
||||
preg_match( "/<secret>(.+?)<\/secret>/" , $xml, $matches );
|
||||
$settings['client_secret'] = $matches[1];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$exploded = explode( '/', rtrim( DOC_IPS_ROOT_PATH, '/' ) );
|
||||
do
|
||||
{
|
||||
$popped = array_pop( $exploded );
|
||||
}
|
||||
while ( strstr( ipsRegistry::$settings['base_url'], $popped ) !== FALSE );
|
||||
$exploded[] = $popped;
|
||||
|
||||
$settings['xml'] = implode( '/', $exploded ) . '/Application-Key.xml';
|
||||
}
|
||||
|
||||
return $this->html->windowsLiveSetup( $settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Settings
|
||||
*/
|
||||
public function saveSettings()
|
||||
{
|
||||
ipsRegistry::getClass('class_permissions')->checkPermissionAutoMsg( 'login_manage' );
|
||||
|
||||
$login = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => "login_folder_name='live'" ) );
|
||||
if ( !$login['login_id'] )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_windowslive_error'], ipsRegistry::$settings['_base_url'] . 'app=core&module=tools&section=login' ) );
|
||||
}
|
||||
|
||||
if ( ipsRegistry::$request['disable'] )
|
||||
{
|
||||
ipsRegistry::DB()->update( 'login_methods', array( 'login_enabled' => 0 ), 'login_id=' . $login['login_id'] );
|
||||
ipsRegistry::cache()->rebuildCache( 'login_methods' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !is_file( ipsRegistry::$request['xml'] ) )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( ipsRegistry::getClass('class_localization')->words['enhancements_windowslive_error2'] );
|
||||
}
|
||||
|
||||
$config = unserialize( $login['login_custom_config'] );
|
||||
$config['key_file_location'] = ipsRegistry::$request['xml'];
|
||||
$toSave = array( 'login_custom_config' => serialize( $config ) );
|
||||
$toSave['login_enabled'] = '1';
|
||||
|
||||
ipsRegistry::DB()->update( 'login_methods', $toSave, 'login_id=' . $login['login_id'] );
|
||||
|
||||
ipsRegistry::cache()->rebuildCache( 'login_methods' );
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2013-03-12 09:54:04 -0400 (Tue, 12 Mar 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 12072 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,20 @@ $_SEOTEMPLATES = array(
|
||||
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
||||
|
||||
'section=lostpass' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=lostpass(&|&|$)#i', 'lostpass/$3' ),
|
||||
'in' => array( 'regex' => "#/lostpass(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'lostpass' ) ) ) ),
|
||||
|
||||
'section=login' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=login(&|&|$)#i', 'login/$3' ),
|
||||
'in' => array( 'regex' => "#/login(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'login' ) ) ) ),
|
||||
|
||||
'tags' => array( 'app' => 'core',
|
||||
'isPagesMode' => true,
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=search(&|&)do=search(&|&)search_tags=(\S+?)(&|&)search_app=(\S+?)(&|&|$)#i', 'tags/$6/$4/$7' ),
|
||||
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
|
||||
@@ -83,7 +96,7 @@ $_SEOTEMPLATES = array(
|
||||
'section=rss2' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)(&|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ),
|
||||
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)-#i",
|
||||
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)(?:-|/|$)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
|
||||
|
||||
# Changed section=rss2 id matching to use \w for more flexibility
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2013-03-12 09:54:04 -0400 (Tue, 12 Mar 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 12072 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* SEO templates
|
||||
*
|
||||
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
|
||||
*
|
||||
* OUT FORMAT REGEX:
|
||||
* First array element is a regex to run to see if we've a match for the URL
|
||||
* The second array element is the template to use the results of the parenthesis capture
|
||||
*
|
||||
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
|
||||
*
|
||||
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
|
||||
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
|
||||
*
|
||||
* IN FORMAT REGEX
|
||||
*
|
||||
* This allows the registry to piece back together a URL based on the template regex
|
||||
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
|
||||
* of the parenthesis capture #1
|
||||
*/
|
||||
$_SEOTEMPLATES = array(
|
||||
|
||||
'section=register' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=register(&|&|$)#i', 'register/$3' ),
|
||||
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
||||
|
||||
'section=lostpass' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=lostpass(&|&|$)#i', 'lostpass/$3' ),
|
||||
'in' => array( 'regex' => "#/lostpass(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'lostpass' ) ) ) ),
|
||||
|
||||
'section=login' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=login(&|&|$)#i', 'login/$3' ),
|
||||
'in' => array( 'regex' => "#/login(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'login' ) ) ) ),
|
||||
|
||||
'tags' => array( 'app' => 'core',
|
||||
'isPagesMode' => true,
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=search(&|&)do=search(&|&)search_tags=(\S+?)(&|&)search_app=(\S+?)(&|&|$)#i', 'tags/$6/$4/$7' ),
|
||||
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'search' ), array( 'do', 'search' ), array( 'search_tags', '$2' ), array( 'search_app', '$1' ) ) ) ),
|
||||
|
||||
'privacy' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=privacy(&|&|$)#i', 'privacypolicy/$4/' ),
|
||||
'in' => array( 'regex' => "#/privacypolicy/#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'privacy' ) ) ) ),
|
||||
|
||||
'likeunsubscribe' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=like(&|&)do=unsubscribe(&|&)key=(\S+?)(&|&|$)#i', 'unsubscribe/$5/' ),
|
||||
'in' => array( 'regex' => "#/unsubscribe/(\S+?)/$#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
|
||||
'findcomment' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=comments(&|&)do=findComment(&|&)fromApp=(\S+?)(&|&)parentId=(\d+?)(&|&)commentId=(\d+?)(&|&|$)#i', 'findComment/$5/$7-$9' ),
|
||||
'in' => array( 'regex' => "#/findComment/(\S+?-\S+?)/(\d+?)-(\d+?)$#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'comments' ), array( 'do', 'findComment' ), array( 'fromApp', '$1' ), array( 'parentId', '$2' ), array( 'commentId', '$3' ) ) ) ),
|
||||
'section=rss' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)$#i', 'rss/$4/' ),
|
||||
'in' => array( 'regex' => "#/rss/(\w+?)/$#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ) ) ) ),
|
||||
|
||||
'section=rss2' => array( 'app' => 'core',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)(&|&)id=(\w+?)$#i', 'rss/$4/$6/' ),
|
||||
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)(?:-|/|$)#i",
|
||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
|
||||
|
||||
|
||||
# Changed section=rss2 id matching to use \w for more flexibility
|
||||
|
||||
);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* $LastChangedDate: 2011-12-08 16:43:34 +0000 (Thu, 08 Dec 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 9971 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* $Author: AndyMillne $
|
||||
* @since 3/8/2011
|
||||
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 8754 $
|
||||
* $LastChangedDate: 2013-03-12 15:04:05 -0400 (Tue, 12 Mar 2013) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 12074 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -86,7 +86,12 @@ class navigation_core
|
||||
$links = array();
|
||||
|
||||
$links[] = array( 'title' => $this->lang->words['view_new_posts'] , 'url' => $this->registry->output->buildUrl( 'app=core&module=search&do=viewNewContent&search_app=forums', 'public') );
|
||||
$links[] = array( 'title' => $this->lang->words['online_user_link'] , 'url' => $this->registry->output->buildUrl( 'app=members&module=online&sort_order=desc', 'public') );
|
||||
|
||||
if ( $this->settings['allow_online_list'] )
|
||||
{
|
||||
$links[] = array( 'title' => $this->lang->words['online_user_link'] , 'url' => $this->registry->output->buildUrl( 'app=members&module=online&sort_order=desc', 'public') );
|
||||
}
|
||||
|
||||
$links[] = array( 'title' => $this->lang->words['registered_users_link'], 'url' => $this->registry->output->buildSEOUrl( 'app=members&module=list', 'public', 'false', 'members_list' ) );
|
||||
$links[] = array( 'title' => $this->lang->words['status_updates_link'] , 'url' => $this->registry->output->buildSEOUrl( 'app=members&module=profile&section=status', 'public', 'false', 'members_status_all' ) );
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2013-05-21 20:51:17 -0400 (Tue, 21 May 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 12263 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -43,8 +43,8 @@ class core_notifications
|
||||
return $_NOTIFY;
|
||||
}
|
||||
|
||||
public function report_center()
|
||||
public function report_center( $member )
|
||||
{
|
||||
return $this->memberData['access_report_center'];
|
||||
return $member['access_report_center'];
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Report Center :: Default plugin
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $LastChangedDate: 2012-12-10 11:06:25 -0500 (Mon, 10 Dec 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: AndyMillne $
|
||||
* @author Based on original "Report Center" by Luke Scott
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 11691 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -386,18 +386,18 @@ EOF;
|
||||
$the_report = $this->DB->fetch();
|
||||
$rid = $the_report['id'];
|
||||
|
||||
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "id='{$rid}'" );
|
||||
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'updated_by' => $this->memberData['member_id'] ), "id='{$rid}'" );
|
||||
}
|
||||
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_html = 0;
|
||||
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
|
||||
/* Load editor stuff */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
|
||||
$editor = new $classToLoad();
|
||||
|
||||
$editor->setLegacyMode(false);
|
||||
|
||||
$build_report = array(
|
||||
'rid' => $rid,
|
||||
'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ),
|
||||
'report' => $editor->process( $this->request['message'] ),
|
||||
'report_by' => $this->memberData['member_id'],
|
||||
'date_reported' => time(),
|
||||
);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* RSS output plugin :: report center
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -14,7 +14,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Config file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
@@ -14,7 +14,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Basic Forum Search
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -13,7 +13,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
@@ -14,7 +14,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
@@ -14,7 +14,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* @file plugin_attachments.php Shared media plugin: attachments
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: rtissier $
|
||||
* $Author: mmecham $
|
||||
* @since 3/8/2011
|
||||
* $LastChangedDate: 2011-03-16 19:10:59 -0400 (Wed, 16 Mar 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 8108 $
|
||||
* $LastChangedDate: 2013-04-03 08:07:11 -0400 (Wed, 03 Apr 2013) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 12145 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -118,8 +118,9 @@ class plugin_core_attachments
|
||||
{
|
||||
$where = " AND attach_file LIKE '%{$string}%'";
|
||||
}
|
||||
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'attachments', 'where' => "attach_member_id={$this->memberData['member_id']}" . $where ) );
|
||||
|
||||
/* Exclude PMs */
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'attachments', 'where' => "attach_rel_module != 'msg' AND attach_member_id={$this->memberData['member_id']}" . $where ) );
|
||||
$rows = array();
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $count['total'],
|
||||
@@ -131,7 +132,7 @@ class plugin_core_attachments
|
||||
'ajaxLoad' => 'mymedia_content',
|
||||
'baseUrl' => "app=core&module=ajax&section=media&do=loadtab&tabapp=core&tabplugin=attachments&search=" . urlencode($string) ) );
|
||||
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_member_id={$this->memberData['member_id']}" . $where, 'order' => 'attach_date DESC', 'limit' => array( $st, $each ) ) );
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module != 'msg' AND attach_member_id={$this->memberData['member_id']}" . $where, 'order' => 'attach_date DESC', 'limit' => array( $st, $each ) ) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_blog_entries extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('blog') || $this->settings['sitemap_priority_blog_entries'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check whether groups can access blog at all:
|
||||
$guestGroup = $this->DB->buildAndFetch(array( 'select' => 'g_blog_settings',
|
||||
'from' => 'groups',
|
||||
'where' => 'g_id = ' . $this->settings['guest_group']));
|
||||
|
||||
// Default is to not allow access unless explicitly given:
|
||||
if(is_null($guestGroup['g_blog_settings']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$settings = unserialize($guestGroup['g_blog_settings']);
|
||||
|
||||
// Not allowed to access unless g_blog_allowview = 1
|
||||
if(!is_array($settings) || intval($settings['g_blog_allowview']) != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$max = $this->settings['sitemap_count_blog_entries'];
|
||||
|
||||
if(!ipSeo_SitemapGenerator::isCronJob() && ($max > 10000 || $max == -1))
|
||||
{
|
||||
$max = 10000;
|
||||
}
|
||||
elseif(ipSeo_SitemapGenerator::isCronJob() && $max == -1)
|
||||
{
|
||||
$max = 50000000;
|
||||
}
|
||||
|
||||
// Get blogs:
|
||||
$addedCount = 0;
|
||||
$limitCount = 0;
|
||||
|
||||
while($addedCount < $max)
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
sleep(0.25);
|
||||
}
|
||||
|
||||
$query = $this->DB->build(array( 'select' => 'e.entry_id, b.blog_id, e.entry_name_seo, e.entry_last_update',
|
||||
'from' => array('blog_entries' => 'e'),
|
||||
'add_join' => array(array('type'=>'left', 'from' => array('blog_blogs' => 'b'),
|
||||
'where' => 'b.blog_id = e.blog_id')),
|
||||
'where' => 'b.blog_private = 0
|
||||
AND b.blog_disabled = 0
|
||||
AND b.blog_allowguests = 1
|
||||
AND b.blog_view_level = \'public\'
|
||||
AND e.entry_status = \'published\'',
|
||||
'order' => 'e.entry_id DESC',
|
||||
'limit' => array($limitCount, 100)));
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
// Add blogs to sitemap:
|
||||
while($entry = $this->DB->fetch($outer))
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?app=blog&module=display§ion=blog&blogid='.$entry['blog_id'].'&showentry=' . $entry['entry_id'];
|
||||
$url = ipSeo_FURL::build($url, 'none', $entry['entry_name_seo'], 'showentry');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $entry['entry_name_seo'], 'showentry');
|
||||
$addedCount = $this->sitemap->addURL($url, $entry['entry_last_update'], $this->settings['sitemap_priority_blog_entries']);
|
||||
|
||||
unset($url);
|
||||
unset($entry);
|
||||
}
|
||||
|
||||
$limitCount += 100;
|
||||
|
||||
// If we've got back less rows than expected, we've probably got no more to pull:
|
||||
if($this->DB->getTotalRows($outer) < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_blogs extends ipseoSitemapPlugin
|
||||
{
|
||||
/**
|
||||
* Generate sitemap entries:
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('blog') || $this->settings['sitemap_priority_blogs'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check whether groups can access blog at all:
|
||||
$guestGroup = $this->DB->buildAndFetch(array( 'select' => 'g_blog_settings',
|
||||
'from' => 'groups',
|
||||
'where' => 'g_id = ' . $this->settings['guest_group']));
|
||||
|
||||
// Default is to not allow access unless explicitly given:
|
||||
if(is_null($guestGroup['g_blog_settings']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$settings = unserialize($guestGroup['g_blog_settings']);
|
||||
|
||||
// Not allowed to access unless g_blog_allowview = 1
|
||||
if(!is_array($settings) || intval($settings['g_blog_allowview']) != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get blogs:
|
||||
$query = $this->DB->build(array( 'select' => 'blog_id, blog_seo_name, blog_last_udate',
|
||||
'from' => 'blog_blogs',
|
||||
'where' => 'blog_private = 0
|
||||
AND blog_disabled = 0
|
||||
AND blog_allowguests = 1
|
||||
AND blog_view_level = \'public\''));
|
||||
$this->DB->execute();
|
||||
|
||||
// Add blogs to sitemap:
|
||||
while($blog = $this->DB->fetch())
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?app=blog&blogid=' . $blog['blog_id'];
|
||||
$url = ipSeo_FURL::build($url, 'none', $blog['blog_seo_name'], 'showblog');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $blog['blog_seo_name'], 'showblog');
|
||||
$this->sitemap->addURL($url, $blog['blog_last_udate'], $this->settings['sitemap_priority_blogs']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_calendar extends ipseoSitemapPlugin
|
||||
{
|
||||
/**
|
||||
* Generate sitemap entries:
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Is it enabled?
|
||||
//-----------------------------------------
|
||||
|
||||
if(!IPSLib::appIsInstalled('calendar') || $this->settings['sitemap_priority_calendar'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Which calendars can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
$calendars = array();
|
||||
$this->DB->build( array(
|
||||
'select' => 'c.cal_id',
|
||||
'from' => array( 'cal_calendars' => 'c' ),
|
||||
'add_join' => array( array(
|
||||
'from' => array('permission_index' => 'p'),
|
||||
'where' => "(p.app = 'calendar' AND p.perm_type = 'calendar' AND p.perm_type_id = c.cal_id)",
|
||||
'type' => 'left'
|
||||
) ),
|
||||
'where' => $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_view' )
|
||||
) );
|
||||
$this->DB->execute();
|
||||
while ( $row = $this->DB->fetch() )
|
||||
{
|
||||
$calendars[] = $row['cal_id'];
|
||||
}
|
||||
|
||||
if ( empty( $calendars ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get past events
|
||||
//-----------------------------------------
|
||||
|
||||
$time = time();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'event_id, event_title_seo, event_start_date',
|
||||
'from' => 'cal_events',
|
||||
'where' => "event_end_date < {$time} AND " . $this->DB->buildWherePermission( $calendars, 'event_calendar_id', FALSE ) . ' AND ' . $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'event_perms' ),
|
||||
'limit' => $this->settings['sitemap_count_calendar_past']
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?app=calendar&module=calendar§ion=view&do=showevent&event_id=' . $row['event_id'];
|
||||
$url = ipSeo_FURL::build( $url, 'none', $row['event_title_seo'], 'cal_event' );
|
||||
|
||||
$this->sitemap->addURL( $url, strtotime( $row['event_start_date'] ), $this->settings['sitemap_priority_calendar'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get future events
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'event_id, event_title_seo, event_start_date',
|
||||
'from' => 'cal_events',
|
||||
'where' => "event_end_date > {$time} AND " . $this->DB->buildWherePermission( $calendars, 'event_calendar_id', FALSE ) . ' AND ' . $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'event_perms' ),
|
||||
'limit' => $this->settings['sitemap_count_calendar_future']
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?app=calendar&module=calendar§ion=view&do=showevent&event_id=' . $row['event_id'];
|
||||
$url = ipSeo_FURL::build( $url, 'none', $row['event_title_seo'], 'cal_event' );
|
||||
|
||||
$this->sitemap->addURL( $url, strtotime( $row['event_start_date'] ), $this->settings['sitemap_priority_calendar'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_chat extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if ( IPSLib::appIsInstalled( 'ipchat' ) and $this->settings['sitemap_priority_chat'] > 0 )
|
||||
{
|
||||
$this->sitemap->addURL( $this->settings['board_url'] . '/index.php?app=chat', time(), $this->settings['sitemap_priority_chat'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_content_database_categories extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('ccs') || $this->settings['sitemap_priority_content_categories'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/functions.php', 'ccsFunctions', 'ccs' );
|
||||
$ccsFunctions = new $classToLoad($this->registry);
|
||||
|
||||
$permCheck1 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm1.perm_view', true);
|
||||
$permCheck2 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm2.perm_view', true);
|
||||
$permCheck3 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.page_view_perms', true);
|
||||
|
||||
$this->DB->build(array( 'select' => 'c.category_id, c.category_last_record_date, d.database_id, p.*',
|
||||
'from' => array('ccs_database_categories' => 'c'),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array('ccs_databases' => 'd'),
|
||||
'where' => "d.database_id = c.category_database_id",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('ccs_pages' => 'p'),
|
||||
'where' => "( d.database_is_articles = 0
|
||||
AND p.page_content LIKE CONCAT('%parse database=\"', d.database_key, '\"%')
|
||||
OR
|
||||
( d.database_is_articles = 1
|
||||
AND p.page_content LIKE '%parse articles%'))",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('permission_index' => 'perm1'),
|
||||
'where' => "(perm1.app = 'ccs' AND
|
||||
(perm1.perm_type = 'databases' OR perm1.perm_type = 'database') AND
|
||||
perm1.perm_type_id = d.database_id)",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('permission_index' => 'perm2'),
|
||||
'where' => "(perm2.app = 'ccs' AND
|
||||
(perm2.perm_type = 'categories' OR perm2.perm_type = 'cat') AND
|
||||
perm2.perm_type_id = c.category_id)",
|
||||
'type' => 'left')
|
||||
),
|
||||
'where' => " {$permCheck1} AND
|
||||
(perm2.perm_view IS NULL OR perm2.perm_view = '' OR perm2.perm_2=',,' OR {$permCheck2}) AND
|
||||
({$permCheck3})",
|
||||
'order' => 'category_id DESC',
|
||||
));
|
||||
|
||||
$result = $this->DB->execute();
|
||||
|
||||
while($category = $this->DB->fetch($result))
|
||||
{
|
||||
$pageUrl = $ccsFunctions->returnPageUrl($category) .'?';
|
||||
$url = $ccsFunctions->getCategoriesClass($category['database_id'], false)->getCategoryUrl($pageUrl, $category['category_id']);
|
||||
|
||||
$this->sitemap->addURL($url, (int)$category['category_last_record_date'], $this->settings['sitemap_priority_content_categories']);
|
||||
}
|
||||
}
|
||||
}
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_content_database_records extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('ccs') || $this->settings['sitemap_priority_content_records'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/functions.php', 'ccsFunctions', 'ccs' );
|
||||
$databaseToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/databases.php', 'databaseBuilder', 'ccs' );
|
||||
$ccsFunctions = new $classToLoad($this->registry);
|
||||
|
||||
$permCheck1 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm1.perm_2', true);
|
||||
$permCheck2 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm2.perm_2', true);
|
||||
$permCheck3 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.page_view_perms', true);
|
||||
|
||||
$this->DB->build(array( 'select' => 'c.category_id, d.*, p.*',
|
||||
'from' => array('ccs_database_categories' => 'c'),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array('ccs_databases' => 'd'),
|
||||
'where' => "d.database_id = c.category_database_id",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('ccs_pages' => 'p'),
|
||||
'where' => "( d.database_is_articles = 0
|
||||
AND p.page_content LIKE CONCAT('%parse database=\"', d.database_key, '\"%')
|
||||
OR
|
||||
( d.database_is_articles = 1
|
||||
AND p.page_content LIKE '%\{parse articles\}%'))",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('permission_index' => 'perm1'),
|
||||
'where' => "(perm1.app = 'ccs' AND
|
||||
(perm1.perm_type = 'databases' OR perm1.perm_type = 'database') AND
|
||||
perm1.perm_type_id = d.database_id)",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('permission_index' => 'perm2'),
|
||||
'where' => "(perm2.app = 'ccs' AND
|
||||
(perm2.perm_type = 'categories' OR perm2.perm_type = 'cat') AND
|
||||
perm2.perm_type_id = c.category_id)",
|
||||
'type' => 'left')
|
||||
),
|
||||
'where' => " {$permCheck1} AND
|
||||
(perm2.perm_2 IS NULL OR perm2.perm_2 = '' OR perm2.perm_2=',,' OR {$permCheck2}) AND
|
||||
({$permCheck3})",
|
||||
'order' => 'category_id DESC',
|
||||
));
|
||||
|
||||
$result = $this->DB->execute();
|
||||
|
||||
$categories = array();
|
||||
$databases = array();
|
||||
|
||||
while($category = $this->DB->fetch($result))
|
||||
{
|
||||
$categories[$category['category_id']] = $category['category_id'];
|
||||
$databases[$category['database_id']] = $category;
|
||||
$databases[$category['database_id']]['base_link'] = $ccsFunctions->returnPageUrl($category) .'?';
|
||||
}
|
||||
|
||||
$_databases = $this->cache->getCache('ccs_databases');
|
||||
|
||||
foreach( $_databases as $_db )
|
||||
{
|
||||
if( isset($databases[ $_db['database_id'] ]) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ipsRegistry::getClass('permissions')->check( 'view', $_db, explode( ',', $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ) ) != TRUE )
|
||||
{
|
||||
$databases[ $_db['database_id'] ] = $_db;
|
||||
$databases[ $_db['database_id'] ]['base_link'] = $ccsFunctions->returnDatabaseUrl( $_db['database_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
/*if(!count($categories))
|
||||
{
|
||||
return;
|
||||
}*/
|
||||
|
||||
$_cats = ( count($categories) ) ? implode( ',', $categories ) : 0;
|
||||
$_hardLimit = !ipSeo_SitemapGenerator::isCronJob() ? 10000 : 500000000;
|
||||
$addedCount = 0;
|
||||
|
||||
foreach($databases as $database)
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
sleep(1);
|
||||
//print 'Processing database: ' . $database['database_name'] . PHP_EOL;
|
||||
}
|
||||
|
||||
$db = new $databaseToLoad($this->registry);
|
||||
$db->categories = $ccsFunctions->getCategoriesClass($database['database_id'], false);
|
||||
$db->database = $database;
|
||||
|
||||
$db->fieldsClass = $this->registry->ccsFunctions->getFieldsClass();
|
||||
|
||||
$limitCount = 0;
|
||||
while(1)
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
sleep(0.25);
|
||||
}
|
||||
|
||||
if($addedCount >= $_hardLimit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
$_published = null;
|
||||
|
||||
if( $database['database_is_articles'] )
|
||||
{
|
||||
$_cache = $this->cache->getCache('ccs_fields');
|
||||
|
||||
foreach( $_cache[ $database['database_id'] ] as $_field )
|
||||
{
|
||||
if( $_field['field_key'] == 'article_date' )
|
||||
{
|
||||
$_published = 'field_' . $_field['field_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->DB->build(array( 'select' => '*',
|
||||
'from' => $database['database_database'],
|
||||
'where' => 'record_approved = 1 AND ( category_id IN ('.$_cats.') OR category_id=0)',
|
||||
'order' => 'record_updated DESC',
|
||||
'limit' => array($limitCount, 100)
|
||||
));
|
||||
$result = $this->DB->execute();
|
||||
|
||||
while($record = $this->DB->fetch($result))
|
||||
{
|
||||
if( $database['database_is_articles'] AND $record[ $_published ] > time() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$record['_skipUpdateDynamic'] = true;
|
||||
$url = $db->getRecordUrl($record);
|
||||
|
||||
$addedCount = $this->sitemap->addUrl($url, (int)$record['record_updated'], $this->settings['sitemap_priority_content_records']);
|
||||
}
|
||||
|
||||
$limitCount += 100;
|
||||
|
||||
// If we've got back less rows than expected, we've probably got no more to pull:
|
||||
if($this->DB->getTotalRows($result) < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_content_pages extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('ccs'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$maxPages = 10000;
|
||||
$curPages = 0;
|
||||
|
||||
|
||||
while($curPages < $maxPages)
|
||||
{
|
||||
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'page_view_perms', true);
|
||||
|
||||
$this->DB->build(array(
|
||||
'select' => '*',
|
||||
'from' => 'ccs_pages',
|
||||
'where' => "({$permCheck}) AND page_content_type = 'page'",
|
||||
'order' => 'page_last_edited DESC',
|
||||
'limit' => array($curPages, 100)));
|
||||
|
||||
$result = $this->DB->execute();
|
||||
|
||||
if($result)
|
||||
{
|
||||
// Add the resulting rows to the sitemap:
|
||||
while($row = $this->DB->fetch($result))
|
||||
{
|
||||
if(!$this->registry->isClassLoaded('ccsFunctions'))
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/functions.php', 'ccsFunctions', 'ccs' );
|
||||
$this->registry->setClass('ccsFunctions', new $classToLoad($this->registry));
|
||||
}
|
||||
$url = $this->registry->ccsFunctions->returnPageUrl($row);
|
||||
|
||||
$priority = ($row['page_folder'] == '' && $row['page_seo_name'] == $this->settings['ccs_default_page']) ? $this->settings['sitemap_priority_ccs_index'] : $this->settings['sitemap_priority_ccs_page'];
|
||||
|
||||
$this->sitemap->addURL($url, $row['page_last_edited'], $priority);
|
||||
}
|
||||
|
||||
// If we've got back less rows than expected, we've probably got no more to pull:
|
||||
$pulledRows = $this->DB->getTotalRows($result);
|
||||
$curPages += $pulledRows;
|
||||
if($pulledRows < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_core extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if($this->settings['sitemap_priority_index'] > 0)
|
||||
{
|
||||
$this->sitemap->addURL($this->settings['board_url'] . '/', time(), $this->settings['sitemap_priority_index']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_downloads_categories extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('downloads') || $this->settings['sitemap_priority_downloads_categories'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get categories:
|
||||
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_view', true);
|
||||
|
||||
$this->DB->build(array( 'select' => 'c.cid, c.cname_furl',
|
||||
'from' => array('downloads_categories' => 'c'),
|
||||
'add_join' => array( array(
|
||||
'from' => array('permission_index' => 'p'),
|
||||
'where' => "(p.app = 'downloads' AND p.perm_type = 'cat' AND p.perm_type_id = c.cid)",
|
||||
'type' => 'left')),
|
||||
'where' => "c.copen = 1 AND ({$permCheck})"));
|
||||
$this->DB->execute();
|
||||
|
||||
// Add to sitemap:
|
||||
while($cat = $this->DB->fetch())
|
||||
{
|
||||
|
||||
$url = $this->settings['board_url'] . '/index.php?app=downloads&showcat=' . $cat['cid'];
|
||||
$url = ipSeo_FURL::build($url, 'none', $cat['cname_furl'], 'idmshowcat');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $cat['cname_furl'], 'idmshowcat');
|
||||
$this->sitemap->addURL($url, null, $this->settings['sitemap_priority_downloads_categories']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_downloads_files extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('downloads') || $this->settings['sitemap_priority_downloads_files'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$addedCount = 0;
|
||||
$limitCount = 0;
|
||||
while($addedCount < $this->settings['sitemap_count_downloads_files'])
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
sleep(0.5);
|
||||
}
|
||||
|
||||
// Get files:
|
||||
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_2', true );
|
||||
|
||||
$this->DB->build(array( 'select' => 'f.file_id, f.file_name_furl, f.file_updated',
|
||||
'from' => array('downloads_files' => 'f'),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array('downloads_categories' => 'c'),
|
||||
'where' => "c.cid = f.file_cat",
|
||||
'type' => 'left'),
|
||||
array(
|
||||
'from' => array('permission_index' => 'p'),
|
||||
'where' => "(p.app = 'downloads' AND p.perm_type = 'cat' AND p.perm_type_id = c.cid)",
|
||||
'type' => 'left'),
|
||||
),
|
||||
'where' => "f.file_broken = 0 AND file_open = 1 AND c.copen = 1 AND ({$permCheck})",
|
||||
'order' => 'f.file_updated DESC',
|
||||
'limit' => array($limitCount, 100)));
|
||||
$result = $this->DB->execute();
|
||||
|
||||
// Add blogs to sitemap:
|
||||
while($file = $this->DB->fetch($result))
|
||||
{
|
||||
if ( ! $file['file_updated'] )
|
||||
{
|
||||
$file['file_updated'] = $file['file_submitted'];
|
||||
}
|
||||
|
||||
$url = $this->settings['board_url'] . '/index.php?app=downloads&showfile=' . $file['file_id'];
|
||||
$url = ipSeo_FURL::build($url, 'none', $file['file_name_furl'], 'idmshowfile');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $file['file_name_furl'], 'idmshowfile');
|
||||
$addedCount = $this->sitemap->addURL($url, $file['file_updated'], $this->settings['sitemap_priority_downloads_files']);
|
||||
}
|
||||
|
||||
$limitCount += 100;
|
||||
|
||||
// If we've got back less rows than expected, we've probably got no more to pull:
|
||||
if($this->DB->getTotalRows($result) < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_forums extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if($this->settings['sitemap_priority_forums'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get categories:
|
||||
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_view', true);
|
||||
|
||||
$this->DB->build(array( 'select' => 'f.*',
|
||||
'from' => array('forums' => 'f'),
|
||||
'add_join' => array( array(
|
||||
'from' => array('permission_index' => 'p'),
|
||||
'where' => "(p.perm_type = 'forum' AND p.perm_type_id = f.id)",
|
||||
'type' => 'left')),
|
||||
'where' => $permCheck));
|
||||
$result = $this->DB->execute();
|
||||
|
||||
if($result)
|
||||
{
|
||||
// Add the resulting rows to the sitemap:
|
||||
while($row = $this->DB->fetch( $result ))
|
||||
{
|
||||
if ( $row['ipseo_priority'] == '0' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$priority = ( $row['ipseo_priority'] == '' ) ? $this->settings['sitemap_priority_forums'] : $row['ipseo_priority'];
|
||||
|
||||
$url = $this->settings['board_url'] . '/index.php?showforum=' . $row['id'];
|
||||
$url = ipSeo_FURL::build($url, 'none', $row['name_seo'], 'showforum');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl( $url, 'none', $row['name_seo'], 'showforum' );
|
||||
|
||||
$mod = intval($row['last_post']) == 0 ? time() : $row['last_post'];
|
||||
$this->sitemap->addURL( $url, $mod, $priority );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_gallery_albums extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
$galleryClassFile = IPSLib::getAppDir('gallery') . '/sources/classes/gallery.php';
|
||||
|
||||
if(!IPSLib::appIsInstalled('gallery') || $this->settings['sitemap_priority_gallery_albums'] == 0 || !is_file($galleryClassFile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( $galleryClassFile, 'ipsGallery', 'gallery' );
|
||||
$this->registry->setClass( 'gallery', new $classToLoad( $this->registry ) );
|
||||
|
||||
$limitCount = 0;
|
||||
while(1)
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
sleep(0.5);
|
||||
}
|
||||
|
||||
$filters = array(
|
||||
'sortOrder' => 'desc',
|
||||
'sortKey' => 'date',
|
||||
'offset' => $limitCount,
|
||||
'limit' => 100,
|
||||
'isViewable' => true,
|
||||
'memberData' => array( 'member_id' => 0 )
|
||||
);
|
||||
|
||||
$albums = $this->registry->gallery->helper('albums')->fetchAlbumsByFilters( $filters );
|
||||
|
||||
foreach($albums as $album)
|
||||
{
|
||||
$url = "{$this->settings['board_url']}/index.php?app=gallery&album={$album['album_id']}";
|
||||
$url = ipSeo_FURL::build( $url, 'none', $album['album_name_seo'], 'viewalbum' );
|
||||
|
||||
$addedCount = $this->sitemap->addUrl( $url, $album['album_last_img_date'], $this->settings['sitemap_priority_gallery_albums'] );
|
||||
}
|
||||
|
||||
$limitCount += 100;
|
||||
|
||||
if(count($albums) < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_gallery_images extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
$galleryClassFile = IPSLib::getAppDir('gallery') . '/sources/classes/gallery.php';
|
||||
|
||||
if(!IPSLib::appIsInstalled('gallery') || $this->settings['sitemap_priority_gallery_images'] == 0 || !is_file($galleryClassFile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( $galleryClassFile, 'ipsGallery', 'gallery' );
|
||||
$this->registry->setClass( 'gallery', new $classToLoad( $this->registry ) );
|
||||
|
||||
$max = $this->settings['sitemap_count_gallery_images'];
|
||||
|
||||
if(!ipSeo_SitemapGenerator::isCronJob() && ($max > 10000 || $max == -1))
|
||||
{
|
||||
$max = 10000;
|
||||
}
|
||||
elseif(ipSeo_SitemapGenerator::isCronJob() && $max == -1)
|
||||
{
|
||||
$max = 500000000;
|
||||
}
|
||||
|
||||
$addedCount = 0;
|
||||
$limitCount = 0;
|
||||
while($addedCount < $max)
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
sleep(0.5);
|
||||
}
|
||||
|
||||
$filters = array(
|
||||
'sortOrder' => 'desc',
|
||||
'sortKey' => 'date',
|
||||
'offset' => $limitCount,
|
||||
'limit' => 100,
|
||||
'getLatestComment' => 1,
|
||||
);
|
||||
|
||||
$memberId = 0;
|
||||
$images = $this->registry->gallery->helper('image')->fetchImages( $memberId, $filters );
|
||||
|
||||
foreach($images as $image)
|
||||
{
|
||||
$url = "{$this->settings['board_url']}/index.php?app=gallery&image={$image['image_id']}";
|
||||
$url = ipSeo_FURL::build( $url, 'none', $image['image_caption_seo'], 'viewimage' );
|
||||
$lastMod = is_null($image['comment_post_date']) ? $image['image_date'] : $image['comment_post_date'];
|
||||
$addedCount = $this->sitemap->addUrl($url, $lastMod, $this->settings['sitemap_priority_gallery_images']);
|
||||
}
|
||||
|
||||
$limitCount += 100;
|
||||
|
||||
if(count($images) < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_nexus_categories extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('nexus') || $this->settings['sitemap_priority_nexus_categories'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get categories:
|
||||
$this->DB->build(array( 'select' => 'pg_id, pg_name, pg_seo_name',
|
||||
'from' => 'nexus_package_groups',
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
// Add to sitemap:
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?app=nexus&module=payments&cat=' . $row['pg_id'];
|
||||
$url = ipSeo_FURL::build( $url, 'none', $row['pg_seo_name'], 'storecat' );
|
||||
|
||||
$this->sitemap->addURL( $url, null, $this->settings['sitemap_priority_nexus_categories'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_nexus_products extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if(!IPSLib::appIsInstalled('nexus') || $this->settings['sitemap_priority_nexus_products'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get categories:
|
||||
$this->DB->build(array( 'select' => 'p_id, p_name, p_seo_name',
|
||||
'from' => 'nexus_packages',
|
||||
'where' => 'p_store=1 AND ' . $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p_member_groups' ),
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
// Add to sitemap:
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?app=nexus&module=payments§ion=store&do=item&id=' . $row['p_id'];
|
||||
$url = ipSeo_FURL::build( $url, 'none', $row['p_seo_name'], 'storeitem' );
|
||||
|
||||
$this->sitemap->addURL( $url, null, $this->settings['sitemap_priority_nexus_products'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
|
||||
if(!IN_IPB)
|
||||
{
|
||||
die('This file is not designed to be accessed directly.');
|
||||
}
|
||||
|
||||
class sitemap_core_topics extends ipseoSitemapPlugin
|
||||
{
|
||||
public function generate()
|
||||
{
|
||||
if($this->settings['sitemap_priority_topics'] == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$maxTopics = (int)ipsRegistry::$settings['sitemap_recent_topics'];
|
||||
|
||||
if(!ipSeo_SitemapGenerator::isCronJob() && ($maxTopics > 10000 || $maxTopics == -1))
|
||||
{
|
||||
$maxTopics = 10000;
|
||||
}
|
||||
elseif(ipSeo_SitemapGenerator::isCronJob() && $maxTopics == -1)
|
||||
{
|
||||
$maxTopics = 50000000;
|
||||
}
|
||||
|
||||
$curTopics = 0;
|
||||
$limitTopics = 0;
|
||||
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
//print 'Done: ';
|
||||
}
|
||||
|
||||
while($curTopics < $maxTopics)
|
||||
{
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
//print $curTopics . ', ';
|
||||
sleep(0.5);
|
||||
}
|
||||
|
||||
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_2', true);
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 't.*, f.ipseo_priority',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array( 'permission_index' => 'p' ),
|
||||
'where' => "(p.perm_type = 'forum' AND p.perm_type_id = t.forum_id)",
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'from' => array( 'forums' => 'f' ),
|
||||
'where' => "f.id=t.forum_id",
|
||||
'type' => 'left'
|
||||
),
|
||||
),
|
||||
'where' => "{$permCheck} AND " . $this->registry->getClass('class_forums')->fetchTopicHiddenQuery( array( 'visible' ), '' ),
|
||||
'limit' => array( $limitTopics, 100 )
|
||||
) );
|
||||
$result = $this->DB->execute();
|
||||
|
||||
if($result)
|
||||
{
|
||||
/*$_one = 0;
|
||||
$_two = 0;
|
||||
$_three = 0;*/
|
||||
|
||||
// Add the resulting rows to the sitemap:
|
||||
while($row = $this->DB->fetch($result))
|
||||
{
|
||||
if ( $row['ipseo_priority'] == '0' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!$this->settings['sitemap_topic_pages'] || $row['posts'] <= $this->settings['display_max_posts'])
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?showtopic=' . $row['tid'];
|
||||
$url = ipSeo_FURL::build($url, 'none', $row['title_seo'], 'showtopic');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $row['title_seo'], 'showtopic');
|
||||
|
||||
if($this->settings['sitemap_priority_topics'] == 100)
|
||||
{
|
||||
$priority = $this->calculatePriority($row);
|
||||
}
|
||||
else
|
||||
{
|
||||
$priority = $this->settings['sitemap_priority_topics'];
|
||||
}
|
||||
|
||||
$curTopics = $this->sitemap->addURL($url, $row['last_post'], $priority);
|
||||
}
|
||||
else
|
||||
{
|
||||
$j = 1;
|
||||
|
||||
for($i = 0; $i <= $row['posts']; $i += $this->settings['display_max_posts'])
|
||||
{
|
||||
$url = $this->settings['board_url'] . '/index.php?showtopic=' . $row['tid'] . ( ( $j == 1 ) ? '' : '&page=' . $j );
|
||||
$url = ipSeo_FURL::build($url, 'none', $row['title_seo'], 'showtopic');
|
||||
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $row['title_seo'], 'showtopic');
|
||||
|
||||
if($this->settings['sitemap_priority_topics'] == 100)
|
||||
{
|
||||
$priority = $this->calculatePriority($row, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$priority = $this->settings['sitemap_priority_topics'];
|
||||
}
|
||||
|
||||
$curTopics = $this->sitemap->addURL($url, $row['last_post'], $priority);
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
|
||||
/*$_one += $one;
|
||||
$_two += $two;
|
||||
$_three += $three;*/
|
||||
}
|
||||
|
||||
$limitTopics += 100;
|
||||
|
||||
// If we've got back less rows than expected, we've probably got no more to pull:
|
||||
if($this->DB->getTotalRows($result) < 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(ipSeo_SitemapGenerator::isCronJob())
|
||||
{
|
||||
//print PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
protected function calculatePriority($topic, $subPage = false)
|
||||
{
|
||||
$priority = $subPage ? 0.4 : 0.6;
|
||||
|
||||
// Modify if forum has a special setting
|
||||
if ( $topic['ipseo_priority'] != '' )
|
||||
{
|
||||
$priority += ( $topic['ipseo_priority'] - $priority );
|
||||
}
|
||||
|
||||
// Boost topics where start date is today:
|
||||
if($topic['start_date'] > (time() - 86400))
|
||||
{
|
||||
$priority = $priority + 0.1;
|
||||
}
|
||||
|
||||
// Drop closed topics, but only if not pinned.
|
||||
if(!$topic['pinned'] && $topic['state'] != 'open')
|
||||
{
|
||||
$priority = $priority - 0.2;
|
||||
}
|
||||
|
||||
// Boost pinned topics:
|
||||
if($topic['pinned'])
|
||||
{
|
||||
$priority = $priority + 0.1;
|
||||
}
|
||||
|
||||
// Boost topics with more than one page of posts:
|
||||
if($topic['posts'] > $this->settings['display_max_posts'])
|
||||
{
|
||||
$priority = $priority + 0.1;
|
||||
}
|
||||
|
||||
// Extra boost for topics with more than ten pages of posts:
|
||||
if($topic['posts'] > ($this->settings['display_max_posts'] * 10))
|
||||
{
|
||||
$priority = $priority + 0.2;
|
||||
}
|
||||
|
||||
if($priority > 1)
|
||||
{
|
||||
$priority = 1.0;
|
||||
}
|
||||
elseif($priority < 0)
|
||||
{
|
||||
$priority = 0.0;
|
||||
}
|
||||
|
||||
return $priority;
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Sphinx template file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -14,7 +14,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
* @since 3.0.0
|
||||
*
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ index <!--SPHINX_CONF_PREFIX-->core_tags_search_main
|
||||
mlock = 0
|
||||
morphology = none
|
||||
min_word_len = 2
|
||||
charset_type = sbcs
|
||||
charset_type = utf-8
|
||||
html_strip = 0
|
||||
#infix_fields = tag_text
|
||||
#min_infix_len = 3
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -6,9 +6,9 @@
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $ (Original: Mark)
|
||||
* @since -
|
||||
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10914 $
|
||||
* $LastChangedDate: 2013-05-01 17:35:09 -0400 (Wed, 01 May 2013) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 12211 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -49,10 +49,12 @@ class warnings_core
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/
|
||||
$comments = classes_comments_bootstrap::controller( $warning['wl_content_id1'] );
|
||||
|
||||
$parent = $comments->remapFromLocal( $comments->fetchParent( $exploded[0] ), 'parent' );
|
||||
$parent = $comments->fetchParent( $exploded[0] );
|
||||
|
||||
if ( ! empty($parent['parent_id']) )
|
||||
if ( ! is_null($parent) )
|
||||
{
|
||||
$parent = $comments->remapFromLocal( $parent, 'parent' );
|
||||
|
||||
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=global§ion=comments&fromApp={$warning['wl_content_id1']}&do=findComment&parentId={$exploded[0]}&comment_id={$exploded[1]}" ), 'title' => $parent['parent_title'] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,11 +335,11 @@ function IPB3TemplateDiffResults()
|
||||
|
||||
if ( json['change_data_type'] == 'css' )
|
||||
{
|
||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 535px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 535px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||
}
|
||||
|
||||
max = document.viewport.getHeight();
|
||||
|
||||
@@ -20,7 +20,7 @@ ACPHomepage = {
|
||||
{
|
||||
if ( $('members_display_name').value == "" )
|
||||
{
|
||||
alert("You must enter a username!");
|
||||
alert("Нужно ввести имя пользователя!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,11 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
||||
} );
|
||||
};
|
||||
|
||||
@@ -143,7 +143,7 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
@@ -159,14 +159,14 @@ function IPBCSS()
|
||||
/* Make sure we're mean it... */
|
||||
if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') )
|
||||
{
|
||||
if ( ! confirm( "REMOVE CSS file?\n This will remove this template bit in ALL skins!" ) )
|
||||
if ( ! confirm( "Удалить CSS файл ?\nФайл будет удален из ВСЕХ стилей!" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! confirm( "Revert CSS file?\n All changes WILL be lost!" ) )
|
||||
if ( ! confirm( "Отменить изменения в CSS файле ?\nВсе изменения будут утеряны!" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
@@ -239,7 +239,7 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
|
||||
@@ -217,14 +217,14 @@ function IPBTemplateDiff()
|
||||
*/
|
||||
this.timeOutAjax = function( t )
|
||||
{
|
||||
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) )
|
||||
if ( confirm( "Нет ответа от сервера.\nХотите подождать?" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.transport.abort();
|
||||
alert( "Request Cancelled" );
|
||||
alert( "Запрос отменен" );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -265,7 +265,7 @@ function IPBTemplateDiff()
|
||||
|
||||
if ( json['error'] )
|
||||
{
|
||||
alert( "An error occurred: " . json['error'] );
|
||||
alert( "Ошибка: " . json['error'] );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ function IPBTemplateSandR()
|
||||
else
|
||||
{
|
||||
$('replaceButton').disabled = false;
|
||||
$('replaceButton').value = "Replace Selected";
|
||||
$('replaceButton').value = "Заменить выбранные";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ function IPBTemplates()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
@@ -169,7 +169,7 @@ function IPBTemplates()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
@@ -222,7 +222,7 @@ function IPBTemplates()
|
||||
if ( json['errors'] )
|
||||
{
|
||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||
alert("Error:: " + json['errors'] );
|
||||
alert("Ошибка: " + json['errors'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,7 +232,7 @@ function IPBTemplates()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
@@ -248,14 +248,14 @@ function IPBTemplates()
|
||||
/* Make sure we're mean it... */
|
||||
if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') )
|
||||
{
|
||||
if ( ! confirm( "REMOVE template bit?\n This will remove this template bit in ALL skins!" ) )
|
||||
if ( ! confirm( "Удалить шаблон?\n Произойдет удаление шаблона из ВСЕХ стилей!" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! confirm( "Revert template bit?\n All changes WILL be lost!" ) )
|
||||
if ( ! confirm( "Откатить изменения?\n Все изменения БУДУТ УТРАЧЕНЫ!" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -301,7 +301,7 @@ function IPBTemplates()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
@@ -338,7 +338,7 @@ function IPBTemplates()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* @file bookmarks.php AJAX storage of bookmarks
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2012 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* @since 7th August 2012
|
||||
* $LastChangedDate: 2011-03-10 21:00:38 +0000 (Thu, 10 Mar 2011) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 8021 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @class AJAX storage of bookmarks
|
||||
* @brief AJAX storage of tab order preference
|
||||
*
|
||||
*/
|
||||
class admin_core_ajax_bookmarks extends ipsAjaxCommand
|
||||
{
|
||||
private $_classBookmark;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_global' ), 'core' );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/admin/bookmarks.php' );
|
||||
$this->_classBookmark = new classes_admin_bookmarks();
|
||||
|
||||
//-----------------------------------------
|
||||
// What shall we do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
case 'add':
|
||||
$this->_add();
|
||||
break;
|
||||
case 'managePane':
|
||||
$this->_managePane();
|
||||
break;
|
||||
case 'delete':
|
||||
$this->_delete();
|
||||
break;
|
||||
case 'save':
|
||||
$this->_save();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save all from manage screen
|
||||
*/
|
||||
protected function _save()
|
||||
{
|
||||
$home = intval( $this->request['home'] );
|
||||
$names = $_POST['names'];
|
||||
$position = array();
|
||||
|
||||
if ( is_array( $_GET['bookmark'] ) )
|
||||
{
|
||||
foreach( $_GET['bookmark'] as $id )
|
||||
{
|
||||
$position[ $id ] = count( $position ) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_array( $names ) )
|
||||
{
|
||||
foreach( $names as $id => $name )
|
||||
{
|
||||
$this->_classBookmark->update( $id, array( 'title' => $name, 'position' => intval( $position[ $id ] ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
$this->_classBookmark->setAsHome( $home );
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a book mark
|
||||
*/
|
||||
protected function _delete()
|
||||
{
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
$this->_classBookmark->removeBookmark( $id );
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage panel
|
||||
*/
|
||||
protected function _managePane()
|
||||
{
|
||||
$bookmarks = $this->_classBookmark->getBookmarks();
|
||||
|
||||
/* Return it then */
|
||||
$this->returnHtml( $this->registry->output->global_template->manageBookmarks( $bookmarks ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a book mark
|
||||
*/
|
||||
protected function _add()
|
||||
{
|
||||
$title = $this->request['title'];
|
||||
$url = $this->request['url'];
|
||||
$home = intval( $this->request['home'] );
|
||||
|
||||
try
|
||||
{
|
||||
$this->_classBookmark->addBookmark( $url, $title, $home );
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
|
||||
}
|
||||
catch( Exception $err )
|
||||
{
|
||||
$this->returnJsonArray( array( 'status' => 'fail', 'msg' => $err->getMessage() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Template comparison
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -14,7 +14,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Handles Admin ajax functions for IP.Board Text Editor
|
||||
* Author: Matt "Matt Mecham" Mecham
|
||||
* Last Updated: $LastChangedDate: 2012-05-29 14:05:10 +0100 (Tue, 29 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: AndyMillne $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Gallery
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10807 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
require_once( IPSLib::getAppDir('core') . '/modules_public/ajax/editor.php' );
|
||||
|
||||
class admin_core_ajax_editor extends public_core_ajax_editor
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,115 +1,115 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Login handler abstraction : AJAX Find Names functions
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 10914 $
|
||||
* @see public_core_ajax_findnames
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class admin_core_ajax_findnames extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'get-member-names':
|
||||
$this->_getMemberNames();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns possible matches for the string input
|
||||
*
|
||||
* @return @e void Outputs to screen
|
||||
*/
|
||||
protected function _getMemberNames()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
|
||||
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check length
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSText::mbstrlen( $name ) < 3 )
|
||||
{
|
||||
$this->returnJsonError( 'requestTooShort' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Try query...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
|
||||
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
|
||||
'limit' => array( 0, 15 ),
|
||||
'add_join' => array( array( 'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => 'p.pp_member_id=m.member_id',
|
||||
'type' => 'left' ) ) ) );
|
||||
$this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Got any results?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->DB->getTotalRows() )
|
||||
{
|
||||
$this->returnJsonArray( array( ) );
|
||||
}
|
||||
|
||||
$return = array();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
if( !$r['members_display_name'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$photo = IPSMember::buildProfilePhoto( $r );
|
||||
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
|
||||
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
|
||||
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
|
||||
'img' => $photo['pp_mini_photo'],
|
||||
'img_w' => $photo['pp_mini_width'],
|
||||
'img_h' => $photo['pp_mini_height']
|
||||
);
|
||||
}
|
||||
|
||||
$this->returnJsonArray( $return );
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Login handler abstraction : AJAX Find Names functions
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 10721 $
|
||||
* @see public_core_ajax_findnames
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class admin_core_ajax_findnames extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'get-member-names':
|
||||
$this->_getMemberNames();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns possible matches for the string input
|
||||
*
|
||||
* @return @e void Outputs to screen
|
||||
*/
|
||||
protected function _getMemberNames()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
|
||||
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check length
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSText::mbstrlen( $name ) < 3 )
|
||||
{
|
||||
$this->returnJsonError( 'requestTooShort' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Try query...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
|
||||
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
|
||||
'limit' => array( 0, 15 ),
|
||||
'add_join' => array( array( 'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => 'p.pp_member_id=m.member_id',
|
||||
'type' => 'left' ) ) ) );
|
||||
$this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Got any results?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->DB->getTotalRows() )
|
||||
{
|
||||
$this->returnJsonArray( array( ) );
|
||||
}
|
||||
|
||||
$return = array();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
if( !$r['members_display_name'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$photo = IPSMember::buildProfilePhoto( $r );
|
||||
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
|
||||
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
|
||||
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
|
||||
'img' => $photo['pp_mini_photo'],
|
||||
'img_w' => $photo['pp_mini_width'],
|
||||
'img_h' => $photo['pp_mini_height']
|
||||
);
|
||||
}
|
||||
|
||||
$this->returnJsonArray( $return );
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Hooks (AJAX)
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2013-02-15 17:36:04 -0500 (Fri, 15 Feb 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: AndyMillne $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 11998 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -208,7 +208,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
||||
|
||||
/* Return data ;o */
|
||||
$minVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
|
||||
$maxVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
|
||||
$maxVersions = $this->registry->output->formDropdown( "maxVersion[{$i}]", $versions );
|
||||
|
||||
$this->returnHtml( "{$this->lang->words['a_min']}: {$minVersions}<br /><br />{$this->lang->words['a_max']}: {$maxVersions}" );
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,21 +3,21 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-24 16:20:59 -0400 (Thu, 24 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* Author: Matt Mecham
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10792 $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: bfarber $
|
||||
* @since 8th Feb 2011
|
||||
* $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 8021 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-11-30 10:02:12 -0500 (Fri, 30 Nov 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* Author: Matt Mecham
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 11668 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -137,6 +137,7 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand
|
||||
$return['data_content'] = $this->skinFunctions->fetchOriginalItem( $return );
|
||||
break;
|
||||
case 'custom':
|
||||
$return['data_set_id'] = $session['merge_set_id'];
|
||||
$return['data_content'] = $this->skinFunctions->fetchCustomItem( $return );
|
||||
break;
|
||||
case 'new':
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* Author: Matt Mecham
|
||||
@@ -17,7 +17,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* Author: Matt Mecham
|
||||
@@ -17,7 +17,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* Author: Matt Mecham
|
||||
@@ -17,7 +17,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 19th May 2006 17:33
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* @since 15 January 2007
|
||||
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10914 $
|
||||
* $LastChangedDate: 2013-05-07 22:02:49 -0400 (Tue, 07 May 2013) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 12236 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
@@ -1085,6 +1085,7 @@ class admin_core_applications_applications extends ipsCommand
|
||||
|
||||
|
||||
$this->moduleRecache();
|
||||
$this->applicationsMenuDataRecache();
|
||||
|
||||
//-----------------------------------------
|
||||
// List...
|
||||
@@ -1163,8 +1164,8 @@ class admin_core_applications_applications extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$form['sys_module_title'] = $this->registry->output->formInput( 'sys_module_title', $_POST['sys_module_title'] ? $_POST['sys_module_title'] : $module['sys_module_title'] );
|
||||
$form['sys_module_description'] = $this->registry->output->formInput( 'sys_module_description', $_POST['sys_module_description'] ? $_POST['sys_module_description'] : $module['sys_module_description'] );
|
||||
$form['sys_module_title'] = $this->registry->output->formInput( 'sys_module_title', $_POST['sys_module_title'] ? $_POST['sys_module_title'] : $module['sys_module_title'], '', 30, 'text', '', '', 32 );
|
||||
$form['sys_module_description'] = $this->registry->output->formInput( 'sys_module_description', $_POST['sys_module_description'] ? $_POST['sys_module_description'] : $module['sys_module_description'], '', 30, 'text', '', '', 100 );
|
||||
$form['sys_module_key'] = $this->registry->output->formInput( 'sys_module_key', $_POST['sys_module_key'] ? $_POST['sys_module_key'] : $module['sys_module_key'] );
|
||||
$form['sys_module_version'] = $this->registry->output->formInput( 'sys_module_version', $_POST['sys_module_version'] ? $_POST['sys_module_version'] : $module['sys_module_version'] );
|
||||
$form['sys_module_protected'] = $this->registry->output->formYesNo( 'sys_module_protected', $_POST['sys_module_protected'] ? $_POST['sys_module_protected'] : $module['sys_module_protected'] );
|
||||
@@ -1534,7 +1535,9 @@ class admin_core_applications_applications extends ipsCommand
|
||||
|
||||
if ( $match[1] )
|
||||
{
|
||||
$this->DB->dropTable( preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] ) );
|
||||
$_table = preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] );
|
||||
|
||||
$this->DB->dropTable( $_table );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1546,7 +1549,14 @@ class admin_core_applications_applications extends ipsCommand
|
||||
|
||||
if ( $match[1] and $match[2] )
|
||||
{
|
||||
$this->DB->dropField( preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] ), $match[2] );
|
||||
$_table = preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] );
|
||||
$_field = $match[2];
|
||||
|
||||
/* check for field */
|
||||
if ( $this->DB->checkForField( $_field, $_table ) )
|
||||
{
|
||||
$this->DB->dropField( $_table, $_field );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1621,6 +1631,7 @@ class admin_core_applications_applications extends ipsCommand
|
||||
}
|
||||
|
||||
$this->DB->delete( 'rc_reports_index', 'rc_class=' . $plugin['com_id'] );
|
||||
$this->DB->delete( 'rc_classes', 'com_id=' . $plugin['com_id'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1786,11 +1797,11 @@ class admin_core_applications_applications extends ipsCommand
|
||||
/* Loop through skin directories */
|
||||
try
|
||||
{
|
||||
foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/skin_cache/' ) as $dir )
|
||||
foreach( new DirectoryIterator( IPS_CACHE_PATH . 'cache/skin_cache/' ) as $dir )
|
||||
{
|
||||
if ( preg_match( "/^(cacheid_)/", $dir->getFileName() ) )
|
||||
{
|
||||
foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/skin_cache/' . $dir->getFileName() . '/' ) as $file )
|
||||
foreach( new DirectoryIterator( IPS_CACHE_PATH . 'cache/skin_cache/' . $dir->getFileName() . '/' ) as $file )
|
||||
{
|
||||
if ( ! $file->isDot() )
|
||||
{
|
||||
@@ -1823,10 +1834,14 @@ class admin_core_applications_applications extends ipsCommand
|
||||
if ( $match == 'contains' )
|
||||
{
|
||||
$this->DB->delete( 'skin_templates', "template_group LIKE '%{$name}%'" );
|
||||
$this->DB->delete( 'skin_templates_previous', "p_template_group LIKE '%{$name}%'" );
|
||||
$this->DB->delete( 'skin_cache', "cache_type='phptemplate' AND cache_value_1 LIKE '%{$name}%'" );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->delete( 'skin_templates', "template_group='{$name}'" );
|
||||
$this->DB->delete( 'skin_templates_previous', "p_template_group='{$name}'" );
|
||||
$this->DB->delete( 'skin_cache', "cache_type='phptemplate' AND cache_value_1='{$name}'" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2314,8 +2329,6 @@ XML;
|
||||
$_groups[] = array( $gid, $gdata['g_title'] );
|
||||
}
|
||||
|
||||
sort( $_groups );
|
||||
|
||||
$form['app_tab_groups'] = $this->registry->output->formMultiDropdown( 'app_tab_groups[]', $_groups, isset( $_POST['app_tab_groups'] ) ? $_POST['app_tab_groups'] : explode( ',', $application['app_tab_groups'] ), 7 );
|
||||
|
||||
/* Setup the global caches MDD */
|
||||
@@ -2434,7 +2447,7 @@ XML;
|
||||
{
|
||||
/* Got updates? */
|
||||
if ( $row['app_update_check'] && $checkUpdates === true )
|
||||
{
|
||||
{
|
||||
$row['app_update_available'] = $hooksClass->_updateAvailable( $row['app_update_check'], $row['app_long_version'] );
|
||||
|
||||
if ( $row['app_update_available'][0] )
|
||||
@@ -2554,8 +2567,8 @@ XML;
|
||||
$okToGo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $info['name'] )
|
||||
|
||||
if ( $info['name'] && $info['key'] != "ipseo" )
|
||||
{
|
||||
$uninstalled[$_file] = array( 'title' => $info['name'], 'author' => $info['author'], 'path' => $filepath, 'okToGo' => $okToGo, 'directory' => $_file );
|
||||
}
|
||||
@@ -2981,7 +2994,7 @@ XML;
|
||||
{
|
||||
$app_dir = $row['app_directory'];
|
||||
$main_items = $modules_cache[$app_dir];
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Continue...
|
||||
//-----------------------------------------
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Blog Application
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th Aug 2004
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Blog Application
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -13,7 +13,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Download Manager Application
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 17 February 2003
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since 20th February 2002
|
||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 8655 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Download Manager Application
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Who knows...
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
/**
|
||||
* @file applications.php Community Enhancements
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 24 July 2012
|
||||
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10952 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @class admin_core_applications_enhancements
|
||||
* @brief Community Enhancements
|
||||
*/
|
||||
class admin_core_applications_enhancements extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) );
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'edit':
|
||||
$this->edit();
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
$this->save();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->manage();
|
||||
break;
|
||||
}
|
||||
|
||||
$this->registry->getClass( 'output' )->html_main .= $this->registry->getClass( 'output' )->global_template->global_frame_wrapper();
|
||||
$this->registry->getClass( 'output' )->sendOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage
|
||||
*/
|
||||
public function manage()
|
||||
{
|
||||
$enhancements = array();
|
||||
|
||||
foreach ( IPSLib::getEnabledApplications() as $app )
|
||||
{
|
||||
if ( is_dir( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/enhancements' ) )
|
||||
{
|
||||
$dir = new DirectoryIterator( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/enhancements' );
|
||||
foreach ( $dir as $file )
|
||||
{
|
||||
if ( $file->isFile() and !$file->isDot() and substr( $file, 0, 1 ) !== '.' and substr( $file, -4 ) === '.php' )
|
||||
{
|
||||
$className = "enhancements_{$app['app_directory']}_" . str_replace( '.php', '', $file->getFilename() );
|
||||
|
||||
/* Backup system isn't ready */
|
||||
if ( $className == 'enhancements_core_ipsbackup' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( $file->getPathName(), $className );
|
||||
$enhancements[ $className ] = new $classToLoad( $this->registry );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uasort( $enhancements, create_function( '$a, $b', 'return $a->title > $b->title;' ) );
|
||||
|
||||
$this->registry->output->html .= $this->html->communityEnhancements( $enhancements );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$exploded = explode( '_', $this->request['service'] );
|
||||
if ( !IPSLib::appIsInstalled( $exploded[1] ) or !is_file( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php' ) )
|
||||
{
|
||||
$this->registry->output->showError( $this->lang->words['err_no_enhancement'], 111800 );
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php', $this->request['service'] );
|
||||
$class = new $classToLoad( $this->registry );
|
||||
|
||||
if ( method_exists( $class, 'check' ) )
|
||||
{
|
||||
$class->check();
|
||||
}
|
||||
|
||||
if ( isset( $class->settings ) and !empty( $class->settings ) )
|
||||
{
|
||||
$settingsClass = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/settings/settings.php', 'admin_core_settings_settings' );
|
||||
$settingsClass = new $settingsClass();
|
||||
$settingsClass->makeRegistryShortcuts( $this->registry );
|
||||
$settingsClass->html = $this->registry->output->loadTemplate('cp_skin_settings');
|
||||
|
||||
$html = '';
|
||||
|
||||
$imploded = implode( ', ', array_map( create_function( '$v', 'return "\'{$v}\'";' ), $class->settings ) );
|
||||
$settings = array();
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key IN( {$imploded} )", 'order' => 'conf_position' ) );
|
||||
$e = $this->DB->execute();
|
||||
while ( $row = $this->DB->fetch( $e ) )
|
||||
{
|
||||
$html .= $settingsClass->_processSettingEntry( $row );
|
||||
}
|
||||
|
||||
$this->registry->output->html .= $this->html->communityEnhancementsSettings( $class, $html );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->html .= $class->editSettings();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$exploded = explode( '_', $this->request['service'] );
|
||||
if ( !IPSLib::appIsInstalled( $exploded[1] ) or !is_file( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php' ) )
|
||||
{
|
||||
$this->registry->output->showError( $this->lang->words['err_no_enhancement'], 111801 );
|
||||
}
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php', $this->request['service'] );
|
||||
$class = new $classToLoad( $this->registry );
|
||||
|
||||
if ( method_exists( $class, 'check' ) )
|
||||
{
|
||||
$class->check();
|
||||
}
|
||||
|
||||
if ( isset( $class->settings ) and !empty( $class->settings ) )
|
||||
{
|
||||
$toSave = array();
|
||||
foreach ( $class->settings as $key )
|
||||
{
|
||||
$toSave[ $key ] = $_POST[ $key ];
|
||||
}
|
||||
IPSLib::updateSettings( $toSave, TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $class->saveSettings();
|
||||
if ( $output and is_string( $output ) )
|
||||
{
|
||||
$this->registry->output->html .= $output;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->redirect( "{$this->settings['base_url']}app=core&module=applications&section=enhancements", $this->lang->words['enhancements_saved'] );
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Gallery Application
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Who knows...
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Nexus Application
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -13,7 +13,7 @@
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,10 +2,10 @@
|
||||
<menu>
|
||||
<tabitems>
|
||||
<item>
|
||||
<title>Manage Applications & Modules</title>
|
||||
<title>Управление Приложениями</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Manage Applications & Modules</subitemtitle>
|
||||
<subitemtitle>Управление Приложениями</subitemtitle>
|
||||
<subitemlang>manage_apps_modules</subitemlang>
|
||||
<subsection>applications</subsection>
|
||||
<subitemurl>do=applications_overview</subitemurl>
|
||||
@@ -15,10 +15,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Manage Hooks</title>
|
||||
<title>Управление Хуками</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Manage Hooks</subitemtitle>
|
||||
<subitemtitle>Управление Хуками</subitemtitle>
|
||||
<subitemlang>manage_hooks</subitemlang>
|
||||
<subsection>hooks</subsection>
|
||||
<subitemurl>do=hooks_overview</subitemurl>
|
||||
@@ -27,5 +27,18 @@
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Расширения</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Расширения</subitemtitle>
|
||||
<subitemlang>community_enhancements</subitemlang>
|
||||
<subsection>enhancements</subsection>
|
||||
<subitemurl></subitemurl>
|
||||
<subitemrolekey>enhancements_manage</subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
</tabitems>
|
||||
</menu>
|
||||
@@ -1,62 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<permissions>
|
||||
<group>
|
||||
<grouptitle>Manage Applications</grouptitle>
|
||||
<grouptitle>Управление приложениями</grouptitle>
|
||||
<grouplang>core_manage_apps</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>app_manage</key>
|
||||
<string>Can manage applications?</string>
|
||||
<string>Может изменять/добавлять приложения?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>app_delete</key>
|
||||
<string>Can delete applications?</string>
|
||||
<string>Может удалять приложения?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>app_install</key>
|
||||
<string>Can install new applications?</string>
|
||||
<string>Может устанавливать новые приложения?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>build_sphinx</key>
|
||||
<string>Can build sphinx.conf? WARNING: Exposes database login details</string>
|
||||
<string>Может создавать sphinx.conf? ВНИМАНИЕ: будут доступны данные для соединения с базой данных</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
<group>
|
||||
<grouptitle>Manage Modules</grouptitle>
|
||||
<grouptitle>Управление модулями</grouptitle>
|
||||
<grouplang>core_manage_modules</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>module_manage</key>
|
||||
<string>Can edit/add application modules?</string>
|
||||
<string>Может изменять/добавлять модули?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>module_delete</key>
|
||||
<string>Can delete application modules?</string>
|
||||
<string>Может удалять модули приложений?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
<group>
|
||||
<grouptitle>Purchase Applications</grouptitle>
|
||||
<grouptitle>Покупка приложений</grouptitle>
|
||||
<grouplang>core_purchase_app</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>purchase_app</key>
|
||||
<string>Can view pages to purchase additional applications?</string>
|
||||
<string>Может просматривать страницу с платными приложениями?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
<group>
|
||||
<grouptitle>Manage Hooks</grouptitle>
|
||||
<grouptitle>Управление хуками</grouptitle>
|
||||
<grouplang>core_manage_hooks</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>hooks_manage</key>
|
||||
<string>Can manage hooks?</string>
|
||||
<string>Может добавлять/изменять хуки?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>hooks_delete</key>
|
||||
<string>Can remove hooks?</string>
|
||||
<string>Может удалять хуки?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
<group>
|
||||
<grouptitle>Расширения для Сообщества</grouptitle>
|
||||
<grouplang>core_community_enhancements</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>enhancements_manage</key>
|
||||
<string>Может управлять расширениями?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Attachment Poster
|
||||
* Last Updated: $Date: 2012-05-21 21:37:50 +0100 (Mon, 21 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10777 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class admin_core_attach_attach extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return @e void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Attachment Controller Class */
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/controller.php', 'classes_attach_controller' );
|
||||
$controller = new $classToLoad( $registry );
|
||||
|
||||
$controller->run( $this->request['do'] );
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since 20th February 2002
|
||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 8655 $
|
||||
*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,10 +2,10 @@
|
||||
<menu>
|
||||
<tabitems>
|
||||
<item>
|
||||
<title>Overview</title>
|
||||
<title>Обзор Системы</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Overview</subitemtitle>
|
||||
<subitemtitle>Обзор Системы</subitemtitle>
|
||||
<subitemlang>diag_overview</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl></subitemurl>
|
||||
@@ -15,10 +15,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Whitespace Checker</title>
|
||||
<title>Проверка Пробелов</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Whitespace Checker</subitemtitle>
|
||||
<subitemtitle>Проверка Пробелов</subitemtitle>
|
||||
<subitemlang>whitespace_checker</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl>do=whitespace</subitemurl>
|
||||
@@ -28,10 +28,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Permissions Checker</title>
|
||||
<title>Проверка Ограничений ФС</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Permissions Checker</subitemtitle>
|
||||
<subitemtitle>Проверка Ограничений ФС</subitemtitle>
|
||||
<subitemlang>permissions_checker</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl>do=filepermissions</subitemurl>
|
||||
@@ -41,10 +41,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Connection Checker</title>
|
||||
<title>Проверка Соединений</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Connection Checker</subitemtitle>
|
||||
<subitemtitle>Проверка Соединений</subitemtitle>
|
||||
<subitemlang>connection_checker</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl>do=connections</subitemurl>
|
||||
@@ -54,10 +54,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Database Checker</title>
|
||||
<title>Прверка БД</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Database Checker</subitemtitle>
|
||||
<subitemtitle>Проверка БД</subitemtitle>
|
||||
<subitemlang>db_checker</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl>do=dbchecker</subitemurl>
|
||||
@@ -67,10 +67,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Database Index Checker</title>
|
||||
<title>Проверка Индексов БД</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Database Index Checker</subitemtitle>
|
||||
<subitemtitle>Проверка Индексов БД</subitemtitle>
|
||||
<subitemlang>dbi_checker</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl>do=dbindex</subitemurl>
|
||||
@@ -80,10 +80,10 @@
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Email Tester</title>
|
||||
<title>Тест Email</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Email Tester</subitemtitle>
|
||||
<subitemtitle>Тест Email</subitemtitle>
|
||||
<subitemlang>email_checker</subitemlang>
|
||||
<subsection>diagnostics</subsection>
|
||||
<subitemurl>do=email</subitemurl>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<permissions>
|
||||
<group>
|
||||
<grouptitle>Diagnostic Tools</grouptitle>
|
||||
<grouptitle>Инструменты диагностики</grouptitle>
|
||||
<grouplang>core_diag_tools</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>index_checker</key>
|
||||
<string>Can use the database index checker? Warning: Allows ability to run database queries indirectly.</string>
|
||||
<string>Может проверять индексы таблиц базы? Внимание: позволяет выполнять запросы к базе.</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>database_checker</key>
|
||||
<string>Can use the database checker? Warning: Allows ability to run database queries indirectly.</string>
|
||||
<string>Может использовать проверку базы данных? Внимание: позволяет выполнять запросы к базе.</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>whitespace_checker</key>
|
||||
<string>Can use the whitespace checker?</string>
|
||||
<string>Может проверять файлы на лишние пробелы?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>connection_checker</key>
|
||||
<string>Can use the connection checker?</string>
|
||||
<string>Может использовать проверку сетевых соединений?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>permission_checker</key>
|
||||
<string>Can use the permissions checker?</string>
|
||||
<string>Может проверять файлы и директории на правильность расстановки прав доступа?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>email_checker</key>
|
||||
<string>Can use the email tester?</string>
|
||||
<string>Может проверять работу почты?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since 20th February 2002
|
||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 8655 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Quick help - shows popups with help information
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10721 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,77 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<menu>
|
||||
<tabitems>
|
||||
<item>
|
||||
<title>Documentation</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Documentation</subitemtitle>
|
||||
<subitemlang>help_documentation</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=docs</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Technical Support</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Technical Support</subitemtitle>
|
||||
<subitemlang>help_support</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=support</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Additional Resources</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Additional Resources</subitemtitle>
|
||||
<subitemlang>help_resources</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=resources</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>IPS Contact Information</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>IPS Contact Information</subitemtitle>
|
||||
<subitemlang>help_contact</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=contact</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Feature Requests</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Feature Requests</subitemtitle>
|
||||
<subitemlang>help_features</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=features</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Report a Bug</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Report a Bug</subitemtitle>
|
||||
<subitemlang>help_bugs</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=bugs</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
</tabitems>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<menu>
|
||||
<tabitems>
|
||||
<item>
|
||||
<title>Документация</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Документация</subitemtitle>
|
||||
<subitemlang>help_documentation</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=docs</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Техническая поддержка</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Техническая поддержка</subitemtitle>
|
||||
<subitemlang>help_support</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=support</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Дополнительные Ресурсы</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Дополнительные Ресурсы</subitemtitle>
|
||||
<subitemlang>help_resources</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=resources</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Контактная Информация</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Контактная Информация</subitemtitle>
|
||||
<subitemlang>help_contact</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=contact</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Запрос Функций</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Запрос Функций</subitemtitle>
|
||||
<subitemlang>help_features</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=features</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
<item>
|
||||
<title>Сообщить об Ошибке</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Сообщить об Ошибке</subitemtitle>
|
||||
<subitemlang>help_bugs</subitemlang>
|
||||
<subsection>quickhelp</subsection>
|
||||
<subitemurl>do=redirect&id=bugs</subitemurl>
|
||||
<subisredirect>1</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
</tabitems>
|
||||
</menu>
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since 20th February 2002
|
||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||
* @version v3.3.4
|
||||
* @version v3.4.5
|
||||
* $Revision: 8655 $
|
||||
*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,10 +2,10 @@
|
||||
<menu>
|
||||
<tabitems>
|
||||
<item>
|
||||
<title>Manage Languages</title>
|
||||
<title>Языки Системы</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Manage Languages</subitemtitle>
|
||||
<subitemtitle>Языки Системы</subitemtitle>
|
||||
<subitemlang>languages</subitemlang>
|
||||
<subsection>manage_languages</subsection>
|
||||
<subitemurl></subitemurl>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<permissions>
|
||||
<group>
|
||||
<grouptitle>Manage Languages</grouptitle>
|
||||
<grouptitle>Управление языками</grouptitle>
|
||||
<grouplang>core_languages</grouplang>
|
||||
<items>
|
||||
<item>
|
||||
<key>lang_words</key>
|
||||
<string>Can add/edit the language bit texts?</string>
|
||||
<string>Может добавлять/изменять слова?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>lang_packs</key>
|
||||
<string>Can add/edit language packs?</string>
|
||||
<string>Может добавлять/изменять языковые наборы?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>lang_pack_info</key>
|
||||
<string>Can alter the language pack properties and information?</string>
|
||||
<string>Может изменять настройки и информацию языковых наборов?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
|
||||
@@ -1,413 +1,452 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* ACP Login/Logout Routines
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 17th August 2004
|
||||
* @version $Revision: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class admin_core_login_manualResolver extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* HTML Skin object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $html;
|
||||
|
||||
/**#@+
|
||||
* Registry objects
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $registry;
|
||||
public $DB;
|
||||
public $settings;
|
||||
public $request;
|
||||
public $lang;
|
||||
public $member;
|
||||
public $memberData;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Login handler object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $han_login;
|
||||
|
||||
/**
|
||||
* Initiate login handler
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function initHanLogin()
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
|
||||
$this->han_login = new $classToLoad( $this->registry );
|
||||
|
||||
$this->han_login->is_admin_auth = 1;
|
||||
$this->han_login->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @param string Validation message
|
||||
* @return @e void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry, $validationMessage='' )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_login' ), 'core' );
|
||||
|
||||
$this->initHanLogin();
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'login':
|
||||
default:
|
||||
$this->loginForm();
|
||||
break;
|
||||
|
||||
case 'login-complete':
|
||||
$this->loginComplete();
|
||||
break;
|
||||
|
||||
case 'login-out':
|
||||
$this->loginOut();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check and verify the login was successful
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function loginComplete()
|
||||
{
|
||||
/* Fetch sessions API */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/session/api.php', 'session_api' );
|
||||
$publicApi = new $classToLoad( $this->registry );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check form details.
|
||||
//-----------------------------------------
|
||||
|
||||
$this->request['email'] = str_replace( '|', '|', $this->request['email'] );
|
||||
|
||||
$username = '';
|
||||
$email = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this a username or email address?
|
||||
//-----------------------------------------
|
||||
|
||||
$_type = $this->han_login->emailOrUsername();
|
||||
|
||||
switch( $_type )
|
||||
{
|
||||
case 1:
|
||||
$username = $this->request['username'];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$email = $this->request['username'];
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$username = $this->request['username'];
|
||||
$email = $this->request['username'];
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check auth
|
||||
//-----------------------------------------
|
||||
|
||||
$this->han_login->loginAuthenticate( $username, $email, trim($this->request['password']) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check return code...
|
||||
//-----------------------------------------
|
||||
|
||||
$mem = $this->han_login->member_data;
|
||||
|
||||
if ( ( ! $mem['member_id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['bad_email_password'] );
|
||||
}
|
||||
|
||||
if ( $this->han_login->return_code == 'NO_ACCESS' )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['no_acp_access'] );
|
||||
}
|
||||
else if ( $this->han_login->return_code != 'SUCCESS' )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['bad_email_password'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// And sort secondary groups...
|
||||
//-----------------------------------------
|
||||
|
||||
$mem = $this->member->setUpSecondaryGroups( $mem );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check access...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $mem['g_access_cp'] != 1 )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['no_acp_access'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Fix up query string...
|
||||
//-----------------------------------------
|
||||
|
||||
$extra_query = "";
|
||||
|
||||
if ( $_POST['qstring'] )
|
||||
{
|
||||
$extra_query = stripslashes( $_POST['qstring'] );
|
||||
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
|
||||
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
|
||||
$extra_query = ltrim( $extra_query, '?' );
|
||||
$extra_query = preg_replace( '!adsess=(\w){32}!' , "" , $extra_query );
|
||||
$extra_query = str_replace( "adsess=x" , "" , $extra_query );
|
||||
$extra_query = str_replace( array( 'old_&', 'old_&' ) , "" , $extra_query );
|
||||
$extra_query = preg_replace( '!s=(\w){32}!' , "" , $extra_query );
|
||||
$extra_query = str_replace( "module=login" , "" , $extra_query );
|
||||
$extra_query = str_replace( "do=login-complete" , "" , $extra_query );
|
||||
$extra_query = str_replace( "/admin" , "" , $extra_query );
|
||||
$extra_query = str_replace( '&' , '&', $extra_query );
|
||||
$extra_query = preg_replace( "#&{1,}#" , "&", $extra_query );
|
||||
$extra_query = preg_replace( "#messageinabottleacp=(.*?)$#" , "" , $extra_query );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Insert session
|
||||
//-----------------------------------------
|
||||
|
||||
$sess_id = md5( uniqid( microtime() ) );
|
||||
|
||||
$this->DB->delete( 'core_sys_cp_sessions', 'session_member_id=' . $mem['member_id'] );
|
||||
|
||||
/* Grab user agent */
|
||||
$uAgent = array();
|
||||
|
||||
$this->DB->insert( 'core_sys_cp_sessions', array( 'session_id' => $sess_id,
|
||||
'session_ip_address' => $this->member->ip_address,
|
||||
'session_member_name' => $mem['members_display_name'],
|
||||
'session_member_id' => $mem['member_id'],
|
||||
'session_member_login_key' => $mem['member_login_key'],
|
||||
'session_location' => 'index',
|
||||
'session_log_in_time' => time(),
|
||||
'session_running_time' => time(),
|
||||
'session_app_data' => serialize( $uAgent ),
|
||||
'session_url' => '' ) );
|
||||
|
||||
$this->request['adsess'] = $sess_id;
|
||||
|
||||
/* Log them in public side if not already */
|
||||
$publicApi->logGuestInAsMember( $mem['member_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect...
|
||||
//-----------------------------------------
|
||||
|
||||
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $extra_query;
|
||||
|
||||
$this->_writeToLog( $this->request['username'], 'ok' );
|
||||
|
||||
ipsRegistry::getClass('output')->global_message = '';
|
||||
ipsRegistry::getClass('output')->silentRedirect( $url );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the user out
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function loginOut()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Do it..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->delete( 'core_sys_cp_sessions', "session_id='" . $this->request['adsess'] . "'" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect...
|
||||
//-----------------------------------------
|
||||
|
||||
ipsRegistry::getClass('output')->silentRedirect( $this->settings['_admin_link'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the user out
|
||||
*
|
||||
* @param string Message to show on the form
|
||||
* @return @e void
|
||||
*/
|
||||
public function loginForm( $message='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$message = $message ? $message : $this->member->sessionClass()->getMessage();
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Remove all out of date sessions, like a good boy. Woof.
|
||||
//-------------------------------------------------------
|
||||
|
||||
$cut_off_stamp = time() - 60*60*2;
|
||||
|
||||
$this->DB->delete( 'core_sys_cp_sessions', "session_running_time < {$cut_off_stamp}" );
|
||||
|
||||
//------------------------------------------------------
|
||||
// Start form
|
||||
//------------------------------------------------------
|
||||
|
||||
$qs = str_replace( '&' , '&' , IPSText::parseCleanValue( urldecode( my_getenv( 'QUERY_STRING' ) ) ) );
|
||||
$qs = str_replace( 'adsess=' , 'old_adsess=' , $qs );
|
||||
$qs = str_replace( 'module=menu', '' , $qs );
|
||||
|
||||
$additional_data = $this->han_login->additionalFormHTML();
|
||||
$replace = false;
|
||||
$data = array();
|
||||
|
||||
if( !is_null($additional_data) AND is_array($additional_data) AND count($additional_data) )
|
||||
{
|
||||
$replace = $additional_data[0];
|
||||
$data = $additional_data[1];
|
||||
}
|
||||
|
||||
$uses_name = false;
|
||||
$uses_email = false;
|
||||
|
||||
foreach( ipsRegistry::cache()->getCache('login_methods') as $method )
|
||||
{
|
||||
$login_methods[ $method['login_folder_name'] ] = $method['login_folder_name'];
|
||||
|
||||
if( $method['login_user_id'] == 'username' or $method['login_user_id'] == 'either' )
|
||||
{
|
||||
$uses_name = true;
|
||||
}
|
||||
|
||||
if( $method['login_user_id'] == 'email' or $method['login_user_id'] == 'either' )
|
||||
{
|
||||
$uses_email = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( $uses_name AND $uses_email )
|
||||
{
|
||||
$this->lang->words['gl_signinname'] = $this->lang->words['enter_name_and_email'];
|
||||
}
|
||||
else if( $uses_email )
|
||||
{
|
||||
$this->lang->words['gl_signinname'] = $this->lang->words['enter_useremail'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->words['gl_signinname'] = $this->lang->words['enter_username'];
|
||||
}
|
||||
|
||||
ipsRegistry::getClass('output')->html_title = $this->lang->words['ipb_login'];
|
||||
ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form( $qs, $message, $replace == 'replace' ? true : false, $data );
|
||||
ipsRegistry::getClass('output')->html_main = str_replace( '<%TITLE%>' , ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main );
|
||||
|
||||
@header("Content-type: text/html");
|
||||
print ipsRegistry::getClass('output')->html_main;
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write to the admin log in loggy ma log
|
||||
*
|
||||
* @param string Username
|
||||
* @param string ok/fail flag
|
||||
* @return @e void
|
||||
* @note This is private so that a hacker couldn't get into ACP, upload a new hook that lets them clear the log, and then clear the login log
|
||||
*/
|
||||
private function _writeToLog( $username='', $flag='fail' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$username = $username ? $username : $this->request['username'];
|
||||
$flag = ( $flag == 'ok' ) ? 1 : 0;
|
||||
$admin_post_details = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate POST / GET details
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $_GET as $k => $v )
|
||||
{
|
||||
$admin_post_details['get'][ $k ] = $v;
|
||||
}
|
||||
|
||||
foreach( $_POST as $k => $v )
|
||||
{
|
||||
if ( $k == 'password' AND IPSText::mbstrlen( $v ) > 1 )
|
||||
{
|
||||
$v = $v ? ( (IPSText::mbstrlen( $v ) - 1) > 0 ? str_repeat( '*', IPSText::mbstrlen( $v ) - 1 ) : '' ) . substr( $v, -1, 1 ) : '';
|
||||
}
|
||||
|
||||
$admin_post_details['post'][ $k ] = $v;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Write to disk...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'admin_login_logs', array( 'admin_ip_address' => $this->member->ip_address,
|
||||
'admin_username' => $username,
|
||||
'admin_time' => time(),
|
||||
'admin_success' => $flag,
|
||||
'admin_post_details' => serialize( $admin_post_details ) ) );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* ACP Login/Logout Routines
|
||||
* Last Updated: $Date: 2013-03-20 10:14:51 -0400 (Wed, 20 Mar 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 17th August 2004
|
||||
* @version $Revision: 12094 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class admin_core_login_manualResolver extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* HTML Skin object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $html;
|
||||
|
||||
/**#@+
|
||||
* Registry objects
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $registry;
|
||||
public $DB;
|
||||
public $settings;
|
||||
public $request;
|
||||
public $lang;
|
||||
public $member;
|
||||
public $memberData;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Login handler object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $han_login;
|
||||
|
||||
/**
|
||||
* Initiate login handler
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function initHanLogin()
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
|
||||
$this->han_login = new $classToLoad( $this->registry );
|
||||
|
||||
$this->han_login->is_admin_auth = 1;
|
||||
$this->han_login->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @param string Validation message
|
||||
* @return @e void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry, $validationMessage='' )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_login' ), 'core' );
|
||||
|
||||
$this->initHanLogin();
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'login':
|
||||
default:
|
||||
$this->loginForm();
|
||||
break;
|
||||
|
||||
case 'login-complete':
|
||||
$this->loginComplete();
|
||||
break;
|
||||
|
||||
case 'login-out':
|
||||
$this->loginOut();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check and verify the login was successful
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function loginComplete()
|
||||
{
|
||||
/* Fetch sessions API */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/session/api.php', 'session_api' );
|
||||
$publicApi = new $classToLoad( $this->registry );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check form details.
|
||||
//-----------------------------------------
|
||||
|
||||
$username = '';
|
||||
$email = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this a username or email address?
|
||||
//-----------------------------------------
|
||||
|
||||
$_type = $this->han_login->emailOrUsername();
|
||||
|
||||
switch( $_type )
|
||||
{
|
||||
case 1:
|
||||
$username = $this->request['username'];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$email = $this->request['username'];
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$username = $this->request['username'];
|
||||
$email = $this->request['username'];
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check auth
|
||||
//-----------------------------------------
|
||||
|
||||
$this->han_login->loginAuthenticate( $username, $email, trim($this->request['password']) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check return code...
|
||||
//-----------------------------------------
|
||||
|
||||
$mem = $this->han_login->member_data;
|
||||
|
||||
if ( ( ! $mem['member_id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['bad_email_password'] );
|
||||
}
|
||||
|
||||
if ( $this->han_login->return_code == 'NO_ACCESS' )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['no_acp_access'] );
|
||||
}
|
||||
else if ( $this->han_login->return_code != 'SUCCESS' )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['bad_email_password'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// And sort secondary groups...
|
||||
//-----------------------------------------
|
||||
|
||||
$mem = $this->member->setUpSecondaryGroups( $mem );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check access...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $mem['g_access_cp'] != 1 )
|
||||
{
|
||||
$this->_writeToLog( $this->request['username'], 'fail' );
|
||||
$this->loginForm( $this->lang->words['no_acp_access'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Fix up query string...
|
||||
//-----------------------------------------
|
||||
|
||||
$extra_query = "";
|
||||
|
||||
if ( $_POST['qstring'] )
|
||||
{
|
||||
$extra_query = stripslashes( htmlspecialchars( $_POST['qstring'] ) );
|
||||
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
|
||||
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
|
||||
$extra_query = ltrim( $extra_query, '?' );
|
||||
$extra_query = preg_replace( '!adsess=(\w){32}!' , "" , $extra_query );
|
||||
$extra_query = str_replace( "adsess=x" , "" , $extra_query );
|
||||
$extra_query = str_replace( array( 'old_&', 'old_&' ) , "" , $extra_query );
|
||||
$extra_query = preg_replace( '!s=(\w){32}!' , "" , $extra_query );
|
||||
$extra_query = str_replace( "module=login" , "" , $extra_query );
|
||||
$extra_query = str_replace( "do=login-complete" , "" , $extra_query );
|
||||
$extra_query = str_replace( "/admin" , "" , $extra_query );
|
||||
$extra_query = str_replace( '&' , '&', $extra_query );
|
||||
$extra_query = preg_replace( "#&{1,}#" , "&", $extra_query );
|
||||
$extra_query = preg_replace( "#messageinabottleacp=(.*?)$#" , "" , $extra_query );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Insert session
|
||||
//-----------------------------------------
|
||||
|
||||
$sess_id = md5( uniqid( microtime() ) );
|
||||
|
||||
$this->DB->delete( 'core_sys_cp_sessions', 'session_member_id=' . $mem['member_id'] );
|
||||
|
||||
/* Grab user agent */
|
||||
$uAgent = array();
|
||||
|
||||
$this->DB->insert( 'core_sys_cp_sessions', array( 'session_id' => $sess_id,
|
||||
'session_ip_address' => $this->member->ip_address,
|
||||
'session_member_name' => $mem['members_display_name'],
|
||||
'session_member_id' => $mem['member_id'],
|
||||
'session_member_login_key' => $mem['member_login_key'],
|
||||
'session_location' => 'index',
|
||||
'session_log_in_time' => time(),
|
||||
'session_running_time' => time(),
|
||||
'session_app_data' => serialize( $uAgent ),
|
||||
'session_url' => '' ) );
|
||||
|
||||
$this->request['adsess'] = $sess_id;
|
||||
|
||||
/* Log them in public side if not already */
|
||||
$publicApi->logGuestInAsMember( $mem['member_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $extra_query )
|
||||
{
|
||||
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $extra_query;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Load main page? */
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/admin/bookmarks.php' );
|
||||
$bookmarks = new classes_admin_bookmarks();
|
||||
$bookmarks->setMember( $mem['member_id'] );
|
||||
|
||||
$home = $bookmarks->getHomeUrl();
|
||||
|
||||
if ( $home !== false )
|
||||
{
|
||||
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $home;
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id;
|
||||
}
|
||||
}
|
||||
|
||||
$this->_writeToLog( $this->request['username'], 'ok' );
|
||||
|
||||
ipsRegistry::getClass('output')->global_message = '';
|
||||
ipsRegistry::getClass('output')->silentRedirect( $url );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the user out
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function loginOut()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Do it..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->delete( 'core_sys_cp_sessions', "session_id='" . $this->request['adsess'] . "'" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect...
|
||||
//-----------------------------------------
|
||||
|
||||
ipsRegistry::getClass('output')->silentRedirect( $this->settings['_admin_link'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the user out
|
||||
*
|
||||
* @param string Message to show on the form
|
||||
* @return @e void
|
||||
*/
|
||||
public function loginForm( $message='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Hang on, do we need the upgrader?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !IN_DEV AND ( !defined('SKIP_UPGRADE_CHECK') OR !SKIP_UPGRADE_CHECK ) )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'setup/sources/base/setup.php' );/*noLibHook*/
|
||||
foreach( ipsRegistry::$applications as $app_dir => $app )
|
||||
{
|
||||
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
|
||||
|
||||
if ( $numbers['latest'][0] and $numbers['latest'][0] > $numbers['current'][0] )
|
||||
{
|
||||
$this->registry->output->silentRedirect( $this->settings['base_acp_url'] . '/upgrade/index.php?_acpRedirect=1' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$message = $message ? $message : $this->member->sessionClass()->getMessage();
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Remove all out of date sessions, like a good boy. Woof.
|
||||
//-------------------------------------------------------
|
||||
|
||||
$cut_off_stamp = time() - 60*60*2;
|
||||
|
||||
$this->DB->delete( 'core_sys_cp_sessions', "session_running_time < {$cut_off_stamp}" );
|
||||
|
||||
//------------------------------------------------------
|
||||
// Start form
|
||||
//------------------------------------------------------
|
||||
|
||||
$qs = str_replace( '&' , '&' , IPSText::parseCleanValue( urldecode( my_getenv( 'QUERY_STRING' ) ) ) );
|
||||
$qs = str_replace( 'adsess=' , 'old_adsess=' , $qs );
|
||||
$qs = str_replace( 'module=menu', '' , $qs );
|
||||
|
||||
$additional_data = $this->han_login->additionalFormHTML();
|
||||
$replace = false;
|
||||
$data = array();
|
||||
|
||||
if( !is_null($additional_data) AND is_array($additional_data) AND count($additional_data) )
|
||||
{
|
||||
$replace = $additional_data[0];
|
||||
$data = $additional_data[1];
|
||||
}
|
||||
|
||||
$uses_name = false;
|
||||
$uses_email = false;
|
||||
|
||||
foreach( ipsRegistry::cache()->getCache('login_methods') as $method )
|
||||
{
|
||||
$login_methods[ $method['login_folder_name'] ] = $method['login_folder_name'];
|
||||
|
||||
if( $method['login_user_id'] == 'username' or $method['login_user_id'] == 'either' )
|
||||
{
|
||||
$uses_name = true;
|
||||
}
|
||||
|
||||
if( $method['login_user_id'] == 'email' or $method['login_user_id'] == 'either' )
|
||||
{
|
||||
$uses_email = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( $uses_name AND $uses_email )
|
||||
{
|
||||
$this->lang->words['gl_signinname'] = $this->lang->words['enter_name_and_email'];
|
||||
}
|
||||
else if( $uses_email )
|
||||
{
|
||||
$this->lang->words['gl_signinname'] = $this->lang->words['enter_useremail'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->words['gl_signinname'] = $this->lang->words['enter_username'];
|
||||
}
|
||||
|
||||
ipsRegistry::getClass('output')->html_title = $this->lang->words['ipb_login'];
|
||||
ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form( $qs, $message, $replace == 'replace' ? true : false, $data );
|
||||
ipsRegistry::getClass('output')->html_main = str_replace( '<%TITLE%>' , ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main );
|
||||
|
||||
@header("Content-type: text/html;charset={$this->settings['gb_char_set']}");
|
||||
print ipsRegistry::getClass('output')->html_main;
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write to the admin log in loggy ma log
|
||||
*
|
||||
* @param string Username
|
||||
* @param string ok/fail flag
|
||||
* @return @e void
|
||||
* @note This is private so that a hacker couldn't get into ACP, upload a new hook that lets them clear the log, and then clear the login log
|
||||
*/
|
||||
private function _writeToLog( $username='', $flag='fail' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$username = $username ? $username : $this->request['username'];
|
||||
$flag = ( $flag == 'ok' ) ? 1 : 0;
|
||||
$admin_post_details = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate POST / GET details
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $_GET as $k => $v )
|
||||
{
|
||||
$admin_post_details['get'][ $k ] = $v;
|
||||
}
|
||||
|
||||
foreach( $_POST as $k => $v )
|
||||
{
|
||||
if ( $k == 'password' AND IPSText::mbstrlen( $v ) > 1 )
|
||||
{
|
||||
$v = $v ? ( (IPSText::mbstrlen( $v ) - 1) > 0 ? str_repeat( '*', IPSText::mbstrlen( $v ) - 1 ) : '' ) . substr( $v, -1, 1 ) : '';
|
||||
}
|
||||
|
||||
$admin_post_details['post'][ $k ] = $v;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Write to disk...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'admin_login_logs', array( 'admin_ip_address' => $this->member->ip_address,
|
||||
'admin_username' => $username,
|
||||
'admin_time' => time(),
|
||||
'admin_success' => $flag,
|
||||
'admin_post_details' => serialize( $admin_post_details ) ) );
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Admin logs
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* $Author: mark $
|
||||
* @since 20th February 2002
|
||||
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10914 $
|
||||
* $LastChangedDate: 2012-04-02 11:17:19 -0400 (Mon, 02 Apr 2012) $
|
||||
* @version v3.4.5
|
||||
* $Revision: 10537 $
|
||||
*/
|
||||
|
||||
$DEFAULT_SECTION = 'logsSplash';
|
||||
@@ -3,9 +3,9 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Email error logs
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
@@ -15,7 +15,7 @@
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 10721 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Error logs
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $LastChangedDate: 2013-02-01 20:54:48 -0500 (Fri, 01 Feb 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: AndyMillne $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 10914 $
|
||||
* @version $Rev: 11930 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
@@ -152,6 +152,7 @@ class admin_core_logs_errorlogs extends ipsCommand
|
||||
|
||||
$url_query[] = 'type=' . $this->request['type'];
|
||||
$url_query[] = 'string=' . urlencode( $string );
|
||||
$url_query[] = 'match=' . $this->request['match'];
|
||||
|
||||
switch( $this->request['type'] )
|
||||
{
|
||||
|
||||
Loaded 100 of 1360 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user